JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Advanced Administration
search filter icon
search icon

Document Information

Preface

1.  Managing Terminals and Modems (Overview)

2.  Setting Up Terminals and Modems (Tasks)

3.  Managing Serial Ports With the Service Access Facility (Tasks)

4.  Managing System Resources (Overview)

5.  Displaying and Changing System Information (Tasks)

6.  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

How to Display the User Ownership of Local UFS File Systems

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

7.  Managing UFS Quotas (Tasks)

8.  Scheduling System Tasks (Tasks)

9.  Managing System Accounting (Tasks)

10.  System Accounting (Reference)

11.  Managing System Performance (Overview)

12.  Managing System Processes (Tasks)

13.  Monitoring System Performance (Tasks)

14.  Troubleshooting Software Problems (Overview)

15.  Managing System Messages

16.  Managing Core Files (Tasks)

17.  Managing System Crash Information (Tasks)

18.  Troubleshooting Miscellaneous Software Problems (Tasks)

19.  Troubleshooting File Access Problems (Tasks)

20.  Resolving UFS File System Inconsistencies (Tasks)

21.  Troubleshooting Software Package Problems (Tasks)

Index

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-9 Displaying the Size of Directories, Subdirectories, and Files

The following example shows the sizes of two directories.

$ du -s /var/adm /var/spool/lp
130     /var/adm
40      /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
2       /var/adm/exacct
2       /var/adm/log
2       /var/adm/streams
2       /var/adm/acct/fiscal
2       /var/adm/acct/nite
2       /var/adm/acct/sum
8       /var/adm/acct
2       /var/adm/sa
2       /var/adm/sm.bin
258     /var/adm
4       /var/spool/lp/admins
2       /var/spool/lp/requests/printing....
4       /var/spool/lp/requests
4       /var/spool/lp/system
2       /var/spool/lp/fifos
24      /var/spool/lp

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

How to Display the User Ownership of Local UFS File Systems

  1. 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.

  2. Display users, directories, or file systems, and the number of 1024-byte blocks used.
    # quot [-a] [filesystem ...]
    -a

    Lists all users of each mounted UFS file system and the number of 1024-byte blocks used.

    filesystem

    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-10 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 /
/dev/rdsk/c0t0d0s0:
43340   root    
 3142   rimmer   
   47   uucp    
   35   lp      
   30   adm     
    4   bin     
    4   daemon  
# quot -a
/dev/rdsk/c0t0d0s0 (/):
43340   root    
 3150   rimmer  
   47   uucp    
   35   lp      
   30   adm     
    4   bin     
    4   daemon  
/dev/rdsk/c0t0d0s6 (/usr):
460651  root    
206632  bin     
  791   uucp    
   46   lp      
    4   daemon  
    1   adm     
/dev/rdsk/c0t0d0s7 (/export/home):
    9   root