DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

du(1M)


du -- summarize disk usage

Synopsis

du [-sarkx] [name . . .]

Description

The du command gives the number of sectors (512 bytes) contained in all files and (recursively) directories within each directory and file specified. The block count includes the indirect blocks of the file. If no names are given, the current directory is used.

A user with the appropriate privileges is able to display information about all files and directories.

du has been multithreaded and uses the enhanced nftw (see ftw(3C)) (walk a file tree) to increase its execution speed.

The optional arguments are as follows:


-s
Give only the grand total (for each of the specified names).

-a
Generate an output line for each file.

-k
Give block count in kilobytes.

-x
Cause block count returned to not follow symbolic links.
If neither -s or -a is specified, an output line is generated for each directory only.

-r
Generate messages about directories that cannot be read, files that cannot be opened, and so on, rather than being silent (the default).
A file with two or more links is only counted once.

Environment variables

If POSIX2 is set, error messages are always reported (that is, the command behaves as if the -r option is always specified).

References

df(1M)

Notices

du only reports disk usage of file types that have backing store (for example, regular, directory, and symbolic link files). Other types of files (for example, pipes, character special files, block special files), will show a disk usage of zero bytes.

If the -a option is not used, non-directories given as arguments are not listed.

If there are links between files in different directories where the directories are on separate branches of the file system hierarchy, du counts the excess files more than once.

This command has been updated to handle files greater than 2GB.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004