JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Common Tasks     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

About This Book

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)

7.  Managing Services (Tasks)

8.  Using the Fault Manager

9.  Managing System Information (Tasks)

10.  Managing System Processes (Tasks)

11.  Monitoring System Performance (Tasks)

12.  Managing Software Packages (Tasks)

13.  Managing Disk Use (Tasks)

Managing Disk Use (Task Map)

Displaying Information About Files and Disk Space

How to Display Information About Files and Disk Space

Checking the Size of Files

How to Display the Size of Files

How to Find Large Files

How to Find Files That Exceed a Specified Size Limit

Checking the Size of Directories

How to Display the Size of Directories, Subdirectories, and Files

Finding and Removing Old or Inactive Files

How to List the Newest 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)

Index

Checking the Size of Directories

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.

How to Display the Size of Directories, Subdirectories, and Files

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