summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjwd <jwd@FreeBSD.org>2000-06-03 20:17:39 +0000
committerjwd <jwd@FreeBSD.org>2000-06-03 20:17:39 +0000
commite64034fa46869232ef1305627f0ad99a4e3e663e (patch)
treeafeb54860dbced9f934225360fb45f271d7a4a3f /bin
parent030112417be6e020b7efbdaf67cf0079efc1de70 (diff)
downloadFreeBSD-src-e64034fa46869232ef1305627f0ad99a4e3e663e.zip
FreeBSD-src-e64034fa46869232ef1305627f0ad99a4e3e663e.tar.gz
Add -g for gigabyte sizes.
Approved by: jkh
Diffstat (limited to 'bin')
-rw-r--r--bin/df/df.15
-rw-r--r--bin/df/df.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/bin/df/df.1 b/bin/df/df.1
index e785321..9660183 100644
--- a/bin/df/df.1
+++ b/bin/df/df.1
@@ -71,6 +71,11 @@ Use 512-byte blocks rather than the default. Note that
this overrides the
.Ev BLOCKSIZE
specification from the environment.
+.It Fl g
+Use 1073741824-byte (1-Gbyte) blocks rather than the default. Note that
+this overrides the
+.Ev BLOCKSIZE
+specification from the environment.
.It Fl H
"Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte,
Gigabyte, Terabyte and Petabyte in order to reduce the number of
diff --git a/bin/df/df.c b/bin/df/df.c
index f75b468..fc8cb34 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -122,7 +122,7 @@ main(argc, argv)
char *mntpt, *mntpath, **vfslist;
vfslist = NULL;
- while ((ch = getopt(argc, argv, "abHhikmnPt:")) != -1)
+ while ((ch = getopt(argc, argv, "abgHhikmnPt:")) != -1)
switch (ch) {
case 'a':
aflag = 1;
@@ -133,6 +133,10 @@ main(argc, argv)
putenv("BLOCKSIZE=512");
hflag = 0;
break;
+ case 'g':
+ putenv("BLOCKSIZE=1g");
+ hflag = 0;
+ break;
case 'H':
hflag = UNITS_SI;
valp = vals_si;
OpenPOWER on IntegriCloud