diff --git a/bin/df/df.1 b/bin/df/df.1 index e785321d653..9660183b033 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 f75b468905e..fc8cb344547 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;