Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Administration: Common Tasks Oracle Solaris 11 Information Library |
1. Locating Information About Oracle Solaris Commands
2. Managing User Accounts and Groups (Overview)
3. Managing User Accounts and Groups (Tasks)
4. Booting and Shutting Down an Oracle Solaris System
5. Working With Oracle Configuration Manager
6. Managing Services (Overview)
9. Managing System Information (Tasks)
10. Managing System Processes (Tasks)
11. Monitoring System Performance (Tasks)
12. Managing Software Packages (Tasks)
Displaying Information About Files and Disk Space
How to Display Information About Files and Disk Space
How to Display the Size of Files
How to Find Files That Exceed a Specified Size Limit
Finding and Removing Old or Inactive Files
How to Find and Remove Old or Inactive Files
How to Clear Out Temporary Directories
How to Find and Delete core Files
How to Delete Crash Dump Files
14. Scheduling System Tasks (Tasks)
15. Setting Up and Administering Printers by Using CUPS (Tasks)
16. Managing the System Console, Terminal Devices, and Power Services (Tasks)
17. Managing System Crash Information (Tasks)
18. Managing Core Files (Tasks)
19. Troubleshooting System and Software Problems (Tasks)
20. Troubleshooting Miscellaneous System and Software Problems (Tasks)
You can display the size of directories by using the du command and options. For more information about these commands, see the du(1) man page.
$ du [-as] [directory ...]
Displays the size of each directory that you specify, including each subdirectory beneath it.
Displays the size of each file and subdirectory, and the total number of blocks that are contained in the specified directory.
Displays the total number of blocks that are contained in the specified directory.
Displays the size of each directory in 1024–byte blocks.
Displays the size of each directory in 1000–byte blocks.
Identifies one or more directories that you want to check. Separate multiple directories in the command-line syntax with spaces.
Example 13-8 Displaying the Size of Directories, Subdirectories, and Files
The following example shows the sizes of two directories.
$ du -s /var/adm /var/spool/cups 7098 /var/adm 0 /var/spool/cups
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/cups 3 /var/adm/streams 3 /var/adm/sa 3 /var/adm/acct/fiscal 3 /var/adm/acct/nite 3 /var/adm/acct/sum 12 /var/adm/acct 3 /var/adm/exacct 3 /var/adm/sm.bin 3 /var/adm/log 3 /var/adm/pool 7098 /var/adm
The following example shows directory sizes in 1024–byte blocks.
$ du -h /usr/share/audio 796K /usr/share/audio/samples/au 797K /usr/share/audio/samples 798K /usr/share/audio