NAME

     du - estimate file space usage


SYNOPSIS

     du [options] [file...]

     POSIX options:  [-askx]

     GNU  options  (shortest  form):   [-abchklmsxDLS]   [--help]
     [--version] [--]


DESCRIPTION

     du reports the amount of disk space used  by  the  specified
     files,  and  by  each directory in the hierarchies rooted at
     the specified files.  Here `disk  space  used'  means  space
     used for the entire file hierarchy below the specified file.

     With no arguments, du reports the disk space for the current
     directory.


POSIX DETAILS

     The output is in 512-byte units by default, but in 1024-byte
     units when the -k option is given.


GNU DETAILS

     The output is in 1024-byte units (when no units  are  speci-
     fied   by   options),   unless   the   environment  variable
     POSIXLY_CORRECT is set, in which case POSIX is followed.


POSIX OPTIONS

     -a   Show counts for all files encountered, not just  direc-
          tories.

     -k   Use 1024-byte units instead  of  the  default  512-byte
          units.

     -s   Only output space usage for the actual arguments given,
          not for their subdirectories.

     -x   Only count space on the same  device  as  the  argument
          given.


GNU OPTIONS

     -a, --all
          Show counts for all files, not just directories.

     -b, --bytes
          Print sizes in bytes, instead of kilobytes.

     -c, --total
          Print a grand total of all arguments  after  all  argu-
          ments  have  been  processed.  This can be used to find
          out the total disk usage of a given  set  of  files  or
          directories.

     -D, --dereference-args
          Dereference symbolic links that are command line  argu-
          ments.   Does not affect other symbolic links.  This is
          helpful for finding out the disk usage of  directories,
          such as /usr/tmp, which are often symbolic links.

     -h, --human-readable
          Append a size letter, such as M for megabytes, to  each
          size.

     -k, --kilobytes
          Print sizes in kilobytes.

     -l, --count-links
          Count the size of all files, even if they have appeared
          already (as a hard link).

     -L, --dereference
          Dereference symbolic links (show the disk space used by
          the  file  or directory that the link points to instead
          of the space used by the link).

     -m, --megabytes
          Print sizes in megabyte (that 1,048,576 bytes) blocks.

     -s, --summarize
          Display only a total for each argument.

     -S, --separate-dirs
          Report the  size  of  each  directory  separately,  not
          including the sizes of subdirectories.

     -x, --one-file-system
          Skip directories that are on different filesystems from
          the one that the argument being processed is on.


GNU STANDARD OPTIONS

     --help
          Print a usage message on standard output and exit  suc-
          cessfully.

     --version
          Print version information on standard output, then exit
          successfully.

     --   Terminate option list.


BUGS

     On BSD systems, du reports sizes that are half  the  correct
     values  for  files  that are NFS-mounted from HP-UX systems.
     On HP-UX systems,  it  reports  sizes  that  are  twice  the
     correct  values for files that are NFS-mounted from BSD sys-
     tems.  This is due to a flaw in HP-UX; it also  affects  the
     HP-UX du program.


ENVIRONMENT

     The variable POSIXLY_CORRECT determines the choice of  unit.
     If  it  is  not  set, and the variable BLOCKSIZE has a value
     starting with `HUMAN', then  behaviour  is  as  for  the  -h
     option,  unless  overridden  by -k or -m options.  The vari-
     ables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the  usual
     meaning.


CONFORMING TO

     POSIX 1003.2


NOTES

     This page describes du as found in the fileutils-3.16  pack-
     age;  other  versions  may differ slightly. Mail corrections
     and additions to  aeb@cwi.nl  and  aw@mail1.bet1.puv.fi  and
     ragnar@lightside.ddns.org  .   Report bugs in the program to
     fileutils-bugs@gnu.ai.mit.edu.