summaryrefslogtreecommitdiffstats
path: root/usr.bin/du
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-06-30 06:50:07 +0000
committercharnier <charnier@FreeBSD.org>1997-06-30 06:50:07 +0000
commit761cfebef56ccc107e35dc1334e596fdbc07bed2 (patch)
tree36fabf60437d38960a2f8a4263a01f709d41427c /usr.bin/du
parent136480890da36aea64796e7d6ba40d1d694eaaed (diff)
downloadFreeBSD-src-761cfebef56ccc107e35dc1334e596fdbc07bed2.zip
FreeBSD-src-761cfebef56ccc107e35dc1334e596fdbc07bed2.tar.gz
Document -k flag.
Diffstat (limited to 'usr.bin/du')
-rw-r--r--usr.bin/du/du.116
-rw-r--r--usr.bin/du/du.c7
2 files changed, 15 insertions, 8 deletions
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1
index 0fa8226..e84a710 100644
--- a/usr.bin/du/du.1
+++ b/usr.bin/du/du.1
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)du.1 8.2 (Berkeley) 4/1/94
-.\" $Id$
+.\" $Id: du.1,v 1.8 1997/02/22 19:54:52 peter Exp $
.\"
.Dd April 1, 1994
.Dt DU 1
@@ -42,6 +42,7 @@
.Nm du
.Op Fl H | Fl L | Fl P
.Op Fl a | s | d Ar depth
+.Op Fl k
.Op Fl x
.Op Ar file ...
.Sh DESCRIPTION
@@ -55,6 +56,10 @@ the current directory is displayed.
The number of blocks are in the same units as that returned by the
.Xr stat 2
system call, i.e. 512-byte blocks.
+If the
+.Fl k
+flag is specified, the number displayed is the number of 1024-byte
+blocks.
Partial numbers of blocks are rounded up.
.Pp
The options are as follows:
@@ -108,12 +113,15 @@ Files having multiple hard links are counted (and displayed) a single
time per
.Nm du
execution.
-.Sh ENVIRONMENTAL VARIABLES
+.Sh ENVIRONMENT VARIABLES
.Bl -tag -width BLOCKSIZE
.It Ev BLOCKSIZE
-If the environmental variable
+If the environment variable
.Ev BLOCKSIZE
-is set, the block counts will be displayed in units of that size block.
+is set, and the
+.Fl k
+option is not specified, the block counts will be displayed in units of that
+size block.
.El
.Sh SEE ALSO
.Xr df 1 ,
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index c4c564d..995860b 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -57,7 +57,7 @@ static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95";
#include <unistd.h>
int linkchk __P((FTSENT *));
-void usage __P((void));
+static void usage __P((void));
int
main(argc, argv)
@@ -231,17 +231,16 @@ linkchk(p)
if (nfiles == maxfiles && (files = realloc((char *)files,
(u_int)(sizeof(ID) * (maxfiles += 128)))) == NULL)
- err(1, "");
+ err(1, "can't allocate memory");
files[nfiles].inode = ino;
files[nfiles].dev = dev;
++nfiles;
return (0);
}
-void
+static void
usage()
{
-
(void)fprintf(stderr,
"usage: du [-H | -L | -P] [-a | -s | -d depth] [-k] [-x] [file ...]\n");
exit(1);
OpenPOWER on IntegriCloud