diff --git a/bin/df/df.1 b/bin/df/df.1 index bf461d62e2b..835ff232710 100644 --- a/bin/df/df.1 +++ b/bin/df/df.1 @@ -39,7 +39,7 @@ .Nd display free disk space .Sh SYNOPSIS .Nm df -.Op Fl in +.Op Fl ink .Op Fl t Ar type .Op Ar file | Ar filesystem ... .Sh DESCRIPTION @@ -60,6 +60,11 @@ The following options are available: .Bl -tag -width Ds .It Fl i Include statistics on the number of free inodes. +.It Fl k +Use 1024-byte (1-Kbyte) blocks rather than the default. Note that +this overrides the +.Ev BLOCKSIZE +specification from the environment. .It Fl n Print out the previously obtained statistics from the filesystems. This option should be used if it is possible that one or more diff --git a/bin/df/df.c b/bin/df/df.c index eb6ee81a436..02e6ca92535 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -121,11 +121,14 @@ main(argc, argv) int ch, err, i, maxwidth, width; char *mntpt; - while ((ch = getopt(argc, argv, "int:")) != EOF) + while ((ch = getopt(argc, argv, "iknt:")) != EOF) switch (ch) { case 'i': iflag = 1; break; + case 'k': + putenv("BLOCKSIZE=1024"); + break; case 'n': nflag = 1; break; @@ -415,6 +418,7 @@ bread(off, buf, cnt) void usage() { - (void)fprintf(stderr, "usage: df [-in] [file | file_system ...]\n"); + fprintf(stderr, + "usage: df [-ikn] [-t fstype] [file | file_system ...]\n"); exit(1); }