summaryrefslogtreecommitdiff
path: root/cmds-fi-du.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-03-15 19:00:57 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-15 19:00:57 +0100
commit4685a560811aef9d782c1d5f601004710dd80e77 (patch)
treeb4d6143f974147b677db13d9f67745535cc4ea38 /cmds-fi-du.c
parentb44d1308287c254b6bf709a46cf438d2b859e871 (diff)
btrfs-progs: fi du: make the output more aligned
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-du.c')
-rw-r--r--cmds-fi-du.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmds-fi-du.c b/cmds-fi-du.c
index 52dba3fd..6f3ef3d2 100644
--- a/cmds-fi-du.c
+++ b/cmds-fi-du.c
@@ -497,14 +497,15 @@ static int du_add_file(const char *filename, int dirfd,
if (is_dir)
set_shared = dir_set_shared;
- printf("%s\t%s\t%s\t%s\n",
+ printf("%10s %10s %10s %s\n",
pretty_size_mode(file_total, unit_mode),
pretty_size_mode(excl, unit_mode),
pretty_size_mode(set_shared, unit_mode),
path);
} else {
- printf("%s\t%s\t\t\t%s\n",
+ printf("%10s %10s %10s %s\n",
pretty_size_mode(file_total, unit_mode),
+ "-",
pretty_size_mode(excl, unit_mode), path);
}
}
@@ -560,7 +561,8 @@ int cmd_filesystem_du(int argc, char **argv)
if (check_argc_min(argc - optind, 1))
usage(cmd_filesystem_du_usage);
- printf("total\texclusive\tset shared\tfilename\n");
+ printf("%10s %10s %10s %s\n", "Total", "Exclusive", "Set shared",
+ "Filename");
for (i = optind; i < argc; i++) {
ret = du_add_file(argv[i], AT_FDCWD, NULL, NULL, NULL, 1);