Checking the Size of Directories
You can display the size of directories by using the du command and
options. Additionally, you can find the amount of disk space used by
user accounts on local UFS file systems by using the quot command. For more
information about these commands, see the du(1) and quot(1M) man pages.
How to Display the Size of Directories, Subdirectories, and Files
Example 6-8 Displaying the Size of Directories, Subdirectories, and Files
The following example shows the sizes of two directories.
$ du -s /var/adm /var/spool/lp
The following example shows the sizes of two directories and includes the sizes
of all the subdirectories and files that are contained within each directory. The
total number of blocks that are contained in each directory is also displayed.
$ du /var/adm /var/spool/lp
The following example shows directory sizes in 1024–byte blocks.
$ du -h /usr/share/audio
How to Display the User Ownership of Local UFS File Systems
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
- Display users, directories, or file systems, and the number of 1024-byte blocks used.
# quot [-a] [filesystem ...]
Lists all users of each mounted UFS file system and the number of 1024-byte blocks used.
Identifies a UFS file system. Users and the number of blocks used are displayed for that file system.
Note - The quot command works only on local UFS file systems.
Example 6-9 Displaying the User Ownership of Local UFS File Systems
In the following example, users of the root (/) file system are displayed.
In the subsequent example, users of all mounted UFS file systems are displayed.
# quot /
# quot -a