du - estimate file space usage
du [options] [file...]
POSIX options: [-askx]
GNU options (shortest form): [-abchklmsxDLS] [--help]
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
The output is in 512-byte units by default, but in 1024-byte
units when the -k option is given.
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.
-a Show counts for all files encountered, not just direc-
-k Use 1024-byte units instead of the default 512-byte
-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
Show counts for all files, not just directories.
Print sizes in bytes, instead of kilobytes.
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
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.
Append a size letter, such as M for megabytes, to each
Print sizes in kilobytes.
Count the size of all files, even if they have appeared
already (as a hard link).
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).
Print sizes in megabyte (that 1,048,576 bytes) blocks.
Display only a total for each argument.
Report the size of each directory separately, not
including the sizes of subdirectories.
Skip directories that are on different filesystems from
the one that the argument being processed is on.
GNU STANDARD OPTIONS
Print a usage message on standard output and exit suc-
Print version information on standard output, then exit
-- Terminate option list.
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.
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
This page describes du as found in the fileutils-3.16 pack-
age; other versions may differ slightly. Mail corrections
and additions to email@example.com and firstname.lastname@example.org and
email@example.com . Report bugs in the program to