summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-08-10 19:21:07 +0000
committerwollman <wollman@FreeBSD.org>1994-08-10 19:21:07 +0000
commit670a01d488cd426b06ef3810ef072b61f698dfba (patch)
tree91f2cea6239e3b0249bce721676ffeda2ae4786e /bin
parent8dd7fea0026294e2042479f4076324d47eabca5b (diff)
downloadFreeBSD-src-670a01d488cd426b06ef3810ef072b61f698dfba.zip
FreeBSD-src-670a01d488cd426b06ef3810ef072b61f698dfba.tar.gz
Gimme back my `-k' option!
Also document `-t' option in the usage message.
Diffstat (limited to 'bin')
-rw-r--r--bin/df/df.17
-rw-r--r--bin/df/df.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/bin/df/df.1 b/bin/df/df.1
index bf461d6..835ff23 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 eb6ee81..02e6ca9 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);
}
OpenPOWER on IntegriCloud