[BACK]Return to du.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / du

Annotation of src/usr.bin/du/du.1, Revision 1.24

1.24    ! jmc         1: .\"    $OpenBSD: du.1,v 1.23 2007/11/13 13:49:50 jmc Exp $
1.4       millert     2: .\"    $NetBSD: du.1,v 1.6 1996/10/18 07:20:31 thorpej Exp $
1.1       deraadt     3: .\"
                      4: .\" Copyright (c) 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.18      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"    @(#)du.1        8.2 (Berkeley) 4/1/94
                     32: .\"
1.24    ! jmc        33: .Dd $Mdocdate: November 13 2007 $
1.1       deraadt    34: .Dt DU 1
                     35: .Os
                     36: .Sh NAME
                     37: .Nm du
                     38: .Nd display disk usage statistics
                     39: .Sh SYNOPSIS
                     40: .Nm du
1.19      jmc        41: .Op Fl a | s
1.14      pjanzen    42: .Op Fl chkrx
1.19      jmc        43: .Op Fl H | L | P
1.1       deraadt    44: .Op Ar file ...
                     45: .Sh DESCRIPTION
                     46: The
1.10      aaron      47: .Nm
1.8       aaron      48: utility displays the file system block usage for each
                     49: .Ar file
                     50: argument
1.1       deraadt    51: and for each directory in the file hierarchy rooted in each directory
1.12      aaron      52: argument.
                     53: Note that the system block usage is usually greater than
1.7       millert    54: the actual size of the file.
1.1       deraadt    55: If no file is specified, the block usage of the hierarchy rooted in
                     56: the current directory is displayed.
                     57: .Pp
                     58: The options are as follows:
                     59: .Bl -tag -width Ds
1.19      jmc        60: .It Fl a
                     61: Display an entry for each file in the file hierarchy.
                     62: .It Fl c
                     63: Display the grand total after all the arguments have been processed.
1.1       deraadt    64: .It Fl H
                     65: Symbolic links on the command line are followed.
                     66: (Symbolic links encountered in the tree traversal are not followed.)
1.19      jmc        67: .It Fl h
                     68: Display numbers in a human readable form.
                     69: Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte in order to
                     70: reduce the number of digits to four or less.
                     71: This overrides the
                     72: .Fl k
                     73: option.
1.1       deraadt    74: .It Fl k
                     75: By default,
1.10      aaron      76: .Nm
1.1       deraadt    77: displays the number of blocks as returned by the
1.10      aaron      78: .Xr stat 2
1.13      aaron      79: system call, i.e., 512-byte blocks.
1.1       deraadt    80: If the
                     81: .Fl k
                     82: flag is specified, the number displayed is the number of 1024-byte
                     83: blocks.
                     84: Partial numbers of blocks are rounded up.
1.19      jmc        85: .It Fl L
                     86: All symbolic links are followed.
                     87: .It Fl P
                     88: No symbolic links are followed.
1.5       deraadt    89: .It Fl r
                     90: Generate messages about directories that cannot be read, files
1.12      aaron      91: that cannot be opened, and so on.
1.23      jmc        92: This is the default.
1.19      jmc        93: .It Fl s
                     94: Display only the grand total for the specified files.
1.1       deraadt    95: .It Fl x
1.11      aaron      96: File system mount points are not traversed.
1.1       deraadt    97: .El
                     98: .Pp
1.10      aaron      99: .Nm
1.1       deraadt   100: counts the storage used by symbolic links and not the files they
                    101: reference unless the
                    102: .Fl H
1.9       aaron     103: or
                    104: .Fl L
                    105: option is specified.
1.1       deraadt   106: If either the
                    107: .Fl H
                    108: or
                    109: .Fl L
                    110: options are specified, storage used by any symbolic links which are
                    111: followed is not counted or displayed.
                    112: The
                    113: .Fl H ,
1.12      aaron     114: .Fl L ,
1.1       deraadt   115: and
                    116: .Fl P
                    117: options override each other and the command's actions are determined
                    118: by the last one specified.
                    119: .Pp
                    120: Files having multiple hard links are counted (and displayed) a single
                    121: time per
1.10      aaron     122: .Nm
1.1       deraadt   123: execution.
1.6       deraadt   124: .Sh ENVIRONMENT
1.1       deraadt   125: .Bl -tag -width BLOCKSIZE
                    126: .It Ev BLOCKSIZE
1.11      aaron     127: Block counts will be displayed in units of this size block, unless the
1.1       deraadt   128: .Fl k
1.16      pjanzen   129: or
                    130: .Fl h
                    131: option is specified.
1.1       deraadt   132: .El
                    133: .Sh SEE ALSO
                    134: .Xr df 1 ,
                    135: .Xr fts 3 ,
                    136: .Xr symlink 7 ,
                    137: .Xr quot 8
1.20      jmc       138: .Sh STANDARDS
                    139: The
                    140: .Nm
                    141: utility is compliant with the
1.24    ! jmc       142: .St -p1003.1-2008
1.20      jmc       143: specification.
                    144: .Pp
                    145: The flags
1.22      jmc       146: .Op Fl chPr
1.20      jmc       147: are extensions to that specification.
1.23      jmc       148: .Pp
                    149: The flag
                    150: .Op Fl r
                    151: exists solely for conformance with
                    152: .St -xpg4 .
1.1       deraadt   153: .Sh HISTORY
                    154: A
1.10      aaron     155: .Nm
1.1       deraadt   156: command appeared in
1.17      mickey    157: .At v3 .