From owner-freebsd-doc@FreeBSD.ORG Thu Nov 10 14:30:07 2011 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7104106566C for ; Thu, 10 Nov 2011 14:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9C7E88FC12 for ; Thu, 10 Nov 2011 14:30:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id pAAEU7wL077808 for ; Thu, 10 Nov 2011 14:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pAAEU73D077804; Thu, 10 Nov 2011 14:30:07 GMT (envelope-from gnats) Resent-Date: Thu, 10 Nov 2011 14:30:07 GMT Resent-Message-Id: <201111101430.pAAEU73D077804@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Best Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 274E5106564A for ; Thu, 10 Nov 2011 14:23:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 179068FC08 for ; Thu, 10 Nov 2011 14:23:52 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pAAENpUG038525 for ; Thu, 10 Nov 2011 14:23:51 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pAAENpbt038506; Thu, 10 Nov 2011 14:23:51 GMT (envelope-from nobody) Message-Id: <201111101423.pAAENpbt038506@red.freebsd.org> Date: Thu, 10 Nov 2011 14:23:51 GMT From: Alexander Best To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/162438: du(1) man page improvements X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 14:30:07 -0000 >Number: 162438 >Category: docs >Synopsis: du(1) man page improvements >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 10 14:30:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alexander Best >Release: 10.0-CURRENT >Organization: >Environment: FreeBSD otaku 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Thu Nov 10 14:01:26 CET 2011 arundel@otaku:/usr/obj/usr/git-freebsd-head/sys/ARUNDEL amd64 >Description: the following patch features improvements to the du(1) man page according to style(9). it also improves the wording here and there. cheers. alex >How-To-Repeat: >Fix: Patch attached with submission follows: diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1 index ef8b5ac..960be23 100644 --- a/usr.bin/du/du.1 +++ b/usr.bin/du/du.1 @@ -28,7 +28,7 @@ .\" @(#)du.1 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd November 6, 2008 +.Dd November 10, 2011 .Dt DU 1 .Os .Sh NAME @@ -36,15 +36,12 @@ .Nd display disk usage statistics .Sh SYNOPSIS .Nm -.Op Fl A +.Op Fl Achklmnx .Op Fl H | L | P -.Op Fl a | s | d Ar depth | Fl t Ar threshold -.Op Fl c -.Op Fl l -.Op Fl h | k | m | B Ar blocksize -.Op Fl n -.Op Fl x +.Op Fl a | s | d Ar depth +.Op Fl B Ar blocksize .Op Fl I Ar mask +.Op Fl t Ar threshold .Op Ar .Sh DESCRIPTION The @@ -61,11 +58,13 @@ The options are as follows: Display the apparent size instead of the disk usage. This can be helpful when operating on compressed volumes or sparse files. .It Fl B Ar blocksize -Calculate block counts in +Calculate block count in .Ar blocksize byte blocks. This is different from the -.Fl k, m +.Fl h, k +and +.Fl m options or setting .Ev BLOCKSIZE and gives an estimate of how much space the examined file hierarchy would @@ -79,20 +78,45 @@ is rounded up to the next multiple of 512. .It Fl H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed. -.It Fl L -Symbolic links on the command line and in file hierarchies are followed. .It Fl I Ar mask Ignore files and directories matching the specified .Ar mask . +.It Fl L +Symbolic links on the command line and in file hierarchies are followed. .It Fl P No symbolic links are followed. This is the default. .It Fl a Display an entry for each file in a file hierarchy. +.It Fl c +Display a grand total. +.It Fl d Ar depth +Display an entry for all files and directories +.Ar depth +directories deep. .It Fl h "Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte. +.It Fl k +Display block count 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 count in 1048576-byte (1-Mbyte) blocks. +.It Fl n +Ignore files and directories with user +.Dq nodump +flag +.Pq Dv UF_NODUMP +set. .It Fl r Generate messages about directories that cannot be read, files that cannot be opened, and so on. @@ -111,31 +135,6 @@ If is negative, display only entries for which size is less than the absolute value of .Ar threshold . -.It Fl d Ar depth -Display an entry for all files and directories -.Ar depth -directories deep. -.It Fl c -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 -Ignore files and directories with user -.Dq nodump -flag -.Pq Dv UF_NODUMP -set. .It Fl x File system mount points are not traversed. .El @@ -152,26 +151,33 @@ If either the .Fl H or .Fl L -options are specified, storage used by any symbolic links which are -followed is not counted or displayed. +option is specified, storage used by any symbolic links which are +followed is not counted (or displayed). +.Pp +The +.Fl h, k +and +.Fl m +options all override each other; the last one specified determines +the block count used. .Sh ENVIRONMENT .Bl -tag -width BLOCKSIZE .It Ev BLOCKSIZE If the environment variable .Ev BLOCKSIZE is set, and the -.Fl k, m +.Fl h, k or -.Fl h -options are not specified, the block counts will be displayed in units of +.Fl m +options are not specified, the block count will be displayed in units of that block size. If .Ev BLOCKSIZE is not set, and the -.Fl k, m +.Fl h, k or -.Fl h -options are not specified, the block counts will be displayed in 512-byte +.Fl m +options are not specified, the block count will be displayed in 512-byte blocks. .El .Sh SEE ALSO >Release-Note: >Audit-Trail: >Unformatted: