summarize disk usage
du [ -afkrsuVx ] [ names ]
The du command gives the number of blocks contained in all
files and directories recursively within each directory and file
specified by the list in the names argument. The block
count includes the indirect blocks of the file. If names
is not supplied, the current directory is used.
"Indirect blocks" refers to blocks used by the filesystem to
store pointers to the actual data blocks that are part of the file.
Hence for large files (that is, those which use large numbers of
pointers), the du command reports disk usage larger than
simply the data blocks associated with the file contents.
du has the following options:
A file with two or more links is only counted once. Symbolic links
are not followed, but the disk space used to hold the actual
symbolic link is counted.
causes an entry to be generated for each file.
Without the -a option, the default behavior is to output
the block count for directories and those files explicitly named by
the names argument.
has the same effect as the -x option.
causes du to report in units of 1024 bytes. The default is
to report in units of 512 bytes.
causes du to report directories that cannot be read, files
that cannot be opened, and so on. This option is obsolete since this
is now the default behavior of du.
causes only the grand total (for each of the specified
names) to be given.
causes du to ignore files that have more than one link.
causes du to display a three-column output reporting the
space usage for versioned files. The first column displays the
current space taken up by files in the directory. The second shows
the space taken up by previous files, that is, files which have been
deleted and the space shown is that used by the hidden
versioned file(s). The third is the total of the first and second
columns, providing usage information for versioned files.
causes du to display the usage of files in the current
filesystem only. Directories containing mounted filesystems will be
By default, this utility reports sizes in 512-byte blocks.
du interprets 1 block
from a 1024-byte block system as 2 of its own 512-byte blocks; thus,
du would report a 500-byte file as using 2 blocks rather
du returns the following values:
an error occurred
Files containing holes will cause an incorrect block count.
du executable file
du is conformant with:
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
A version of du
that can handle files greater than 2GB
is available in /u95/bin. See
for more information.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005