Installation guide

7.7.2 Checking Disk Use
If you determine that a file system has insufficient space available, check
how its space is being used. You can do this with the du command or the
quot command.
The du command pinpoints disk space allocation by directory. With this
information you can decide who is using the most space and who should
free up disk space.
The du command has the following syntax:
/usr/bin/du
[- aklrsx ][ directory ... filename ...]
The du command displays the number of blocks contained in all directories
(listed recursively) within each specified directory, file name, or (if none are
specified) the current working directory. The block count includes the
indirect blocks of each file in 1-kilobyte units, independent of the cluster
size used by the system.
If you do not specify any options, an entry is generated only for each
directory. Refer to the du
(1) reference page for more information on
command options.
The following example displays a summary of blocks that all main
subdirectories in the /usr/users directory use:
# /usr/bin/du s /usr/users/*
440 /usr/users/barnam
43 /usr/users/broland
747 /usr/users/frome
6804 /usr/users/morse
11183 /usr/users/rubin
2274 /usr/users/somer
From this information, you can determine that user rubin is using the most
disk space.
The following example displays the space that each file and subdirectory in
the /usr/users/rubin/online directory uses:
# /usr/bin/du -a /usr/users/rubin/online
1 /usr/users/rubin/online/inof/license
2 /usr/users/rubin/online/inof
7 /usr/users/rubin/online/TOC_ft1
16 /usr/users/rubin/online/build
.
.
.
251 /usr/users/rubin/online
Administering the UNIX File System 7–23