- -a
-
The usage of all items is reported. Normally
du
displays only the usage at directories. When this option is specified,
the usage of all filesystem items (regular files, directories, etc.)
encountered is displayed.
- -b
-
Report disk usage in number of bytes; equivalent to ``-B 1''. Note
that disk usage in bytes is not the same thing as file size. A one
byte file residing on a 1K filesystem, for example, has a disk usage
of 1024 bytes and not 1 byte.
- -B size
-
The usage is reported in terms of
size
byte blocks instead of the default. (The
-h
option will tell you what this default value is.) A
size
of zero means use the physical filesystem disk block size as the
reporting block size. Note that this value is system dependant, and
can vary across different filesystems upon the machine.
- -c n,...
-
The disk usage will be broken down by age and displayed in columns,
one column for each value in the list. Each column shows the usage
by entries
n
days or older. For example, the command:
du -c 0,7,30
displays the usage in three columns: the total usage (zero days or
older), the usage by entries a week or older, and the usage by entries
a month or older. The default behavior of
du
is equivalent to ``-c 0''. The age is based upon an entry's time of
last modification.
- -C
-
Displays a count of entries as well as the disk usage of those entries.
The count includes only those items that participated in the disk
usage calculation. If, for example, the
-u
options (to skip multiply-linked files) is also specified, multiply-linked
files will be omitted not only from the usual usage calculations,
but also the file count requested by the
-C
option.
- -f
-
This option will prevent
du
from processing a directory (either scanning its contents or descending
into it) if that would result in crossing a mount point, i.e. onto a
different filesystem.
- -F
-
This option will prevent
du
from processing a directory (either scanning its contents or descending
into it) if that would result in crossing a remote mount point, i.e.
onto a network filesystem. This differs from the
-f
option in that local filesystem mount points will be traversed when
-F
is specified.
- -h
-
Displays a help summary. Will also indicate the default size of the
disk blocks used in reporting.
- -i
-
Do not accumulate subdirectories' usage into the parent directory's
usage. If, for example, you run:
du -i comp/text
then the disk usage for a subdirectory
comp/text/desktop
will not be accumulated into the disk usage of
comp/text.
- -k
-
Report disk usage in number of kilobytes; equivalent to ``-B 1024''.
- -l
-
Normally
du
will count a file with multiple (hard) links only once. With this option,
du
will count the file each time is is encountered.
- -L
-
Count each instance of a multiply (hard) linked regular file, but average
the usage over each of the links. If, for example, a 7 block file is
linked to the names
comp/unix/questions/13,
comp/unix/programmer/12,
and
alt/flame/33,
then
du
will count the file three times with usages of 3, 2, and 2 blocks,
respectively.
- -r
-
Traditionally,
du
does it's work silently and will not report any errors, e.g. a
name
specified on the command line doesn't exist, you don't have permissions
to check a directory, etc. This version of
du
normally prints these errors to the
stderr
output. It can be configured, however, to be compatible with the traditional
behavior and suppress error messages. If this is done, then the
-r
option will be available to enable these error messages. The
-h
option will tell you whether or not this option has been enabled.
- -s
-
Normally
du
reports the disk usage for each directory it encounters. This
option suppresses that information and instead reports just a
total usage for each of the items specified on the command line.
- -t
-
A grand total of all items specified on the command line will be
accumulated and displayed. For example, the command
du -st /usr/man/man*
will show the disk usage of each manual page source directory, plus
a grand total of these directories.
- -u
-
Causes multiply linked files to be skipped entirely and omitted from the
usage statistics.
- -U user
-
Only entries owned by the indicated
user
will be counted. Either a username or UID number may be specified.