/usr/ucb/du [ -a ] [ -s ] [ filename ... ]
SUNWscpu
du gives the number of kilobytes contained in all files and, recursively, directories within each specified directory or file filename. If filename is missing, ‘.’ (the current directory) is used.
A file which has multiple links to it is only counted once.
Entries are generated only for each directory in the absence of options.
Here is an example of using du in a directory. We used the pwd(1) command to identify the directory, then used du to show the usage of all the subdirectories in that directory. The grand total for the directory is the last entry in the display:
example% pwd /usr/ralph/misc example% du 5 ./jokes 33 ./squash 44 ./tech.papers/lpr.document 217 ./tech.papers/new.manager 401 ./tech.papers 144 ./memos 80 ./letters 388 ./window 93 ./messages 15 ./useful.news 1211 . example%
If any of the LC_*
variables ( LC_CTYPE, LC_MESSAGES, LC_TIME,
LC_COLLATE, LC_NUMERIC,
and LC_MONETARY
) (see environ(5)
) are not
set in the environment, the operational behavior of du for each corresponding
locale category is determined by the value of the LANG
environment variable.
If LC_ALL
is set, its contents are used to override both the LANG
and
the other LC_*
variables. If none of the above variables is set in the
environment, the "C" (U.S. style) locale determines how du behaves.
If there are too many distinct linked files, du will count the excess files more than once.