summaryrefslogtreecommitdiffstats
path: root/usr.bin/du/du.1
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2008-02-25 19:06:43 +0000
committerkeramida <keramida@FreeBSD.org>2008-02-25 19:06:43 +0000
commit67638f8d86ed7b5408ba9ed6f4d3840ae7de3a03 (patch)
treebe80ec6ff9c0843d2cb2004c39dfbfd2c3d204c0 /usr.bin/du/du.1
parentf1033f806d4ac62a8881815fad77e2587b4248fa (diff)
downloadFreeBSD-src-67638f8d86ed7b5408ba9ed6f4d3840ae7de3a03.zip
FreeBSD-src-67638f8d86ed7b5408ba9ed6f4d3840ae7de3a03.tar.gz
Implement from scratch a -l option for du(1), to match the same option
of the GNU utility. The default behavior of our original `du' is to count hardlinked files only once for each invocation of the utility. With the new -l option they count towards the final size every time they are found. PR: bin/117944 Submitted by: keramida Reviewed by: des, obrien MFC after: 2 weeks
Diffstat (limited to 'usr.bin/du/du.1')
-rw-r--r--usr.bin/du/du.117
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1
index 8594ba7..60264cd 100644
--- a/usr.bin/du/du.1
+++ b/usr.bin/du/du.1
@@ -32,7 +32,7 @@
.\" @(#)du.1 8.2 (Berkeley) 4/1/94
.\" $FreeBSD$
.\"
-.Dd May 6, 2006
+.Dd February 25, 2008
.Dt DU 1
.Os
.Sh NAME
@@ -43,6 +43,7 @@
.Op Fl H | L | P
.Op Fl a | s | d Ar depth
.Op Fl c
+.Op Fl l
.Op Fl h | k | m
.Op Fl n
.Op Fl x
@@ -94,6 +95,15 @@ directories deep.
Display a grand total.
.It Fl k
Display block counts in 1024-byte (1-Kbyte) blocks.
+.It Fl l
+If a file has multiple hard links, count its size many times.
+The default behavior of
+.Nm
+is to count files with multiple hard links only once.
+When the
+.Fl l
+option is specified, the hard link checks are disabled, and these files
+are counted (and displayed) as many times as they are found.
.It Fl m
Display block counts in 1048576-byte (1-Mbyte) blocks.
.It Fl n
@@ -120,11 +130,6 @@ or
.Fl L
options are specified, storage used by any symbolic links which are
followed is not counted or displayed.
-.Pp
-Files having multiple hard links are counted (and displayed) a single
-time per
-.Nm
-execution.
.Sh ENVIRONMENT
.Bl -tag -width BLOCKSIZE
.It Ev BLOCKSIZE
OpenPOWER on IntegriCloud