JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Administration: Devices and File Systems     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Tasks)

2.  Writing CDs and DVDs (Tasks)

3.  Managing Devices (Tasks)

4.  Dynamically Configuring Devices (Tasks)

5.  Managing USB Devices (Tasks)

6.  Using InfiniBand Devices (Overview/Tasks)

7.  Managing Disks (Overview)

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

9.  Administering Disks (Tasks)

10.  Setting Up Disks (Tasks)

11.  Configuring Storage Devices With COMSTAR (Tasks)

12.  Configuring and Managing the Oracle Solaris Internet Storage Name Service (iSNS)

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

17.  Copying Files and File Systems (Tasks)

18.  Managing Tape Drives (Tasks)

Index

Displaying Information About Files and Disk Space

This table summarizes the commands available for displaying information about file size and disk space.

Command
Description
Man Page
df
Reports the number of free disk blocks and files
du
Summarizes disk space allocated to each subdirectory
find -size
Searches recursively through a directory based on the size specified with the -size option
ls -lh
Lists the size of a file in the power of 1024 scaling

How to Display Information About Files and Disk Space

Example 8-1 Displaying Information About File Size and Disk Space

In the following example, all the file systems listed are locally mounted except for /usr/dist.

$ df
/                  (/dev/dsk/c0t0d0s0 ):  101294 blocks   105480 files
/devices           (/devices          ):       0 blocks        0 files
/system/contract   (ctfs              ):       0 blocks 2147483578 files
/proc              (proc              ):       0 blocks     1871 files
/etc/mnttab        (mnttab            ):       0 blocks        0 files
/etc/svc/volatile  (swap              ):  992704 blocks    16964 files
/system/object     (objfs             ):       0 blocks 2147483530 files
/usr               (/dev/dsk/c0t0d0s6 ):  503774 blocks   299189 files
/dev/fd            (fd                ):       0 blocks        0 files
/var/run           (swap              ):  992704 blocks    16964 files
/tmp               (swap              ):  992704 blocks    16964 files
/opt               (/dev/dsk/c0t0d0s5 ):   23914 blocks     6947 files
/export/home       (/dev/dsk/c0t0d0s7 ):   16810 blocks     7160 files

Example 8-2 Displaying File Size Information in 1024 Bytes on a System With a ZFS Root File System

In the following example, file system information for a system is displayed in 1024 bytes.

Filesystem             size   used  avail capacity  Mounted on
rpool/ROOT/s1008be      67G   4.6G    58G     8%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   1.9G   1.5M   1.9G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                        63G   4.6G    58G     8% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        63G   4.6G    58G     8% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
rpool/ROOT/s1008be/var
                        67G    73M    58G     1%    /var
swap                   1.9G    32K   1.9G     1%    /tmp
swap                   1.9G    40K   1.9G     1%    /var/run
rpool/export            67G    20K    58G     1%    /export
rpool/export/home       67G    18K    58G     1%    /export/home

Example 8-3 Displaying Total Number of Blocks and Files Allocated for a File System

The following example shows a list of all mounted file systems, device names, total 512-byte blocks used, and the number of files. The second line of each two-line entry displays the total number of blocks and files that are allocated for the file system.

$ df -t
/                  (/dev/dsk/c0t0d0s0 ):   101294 blocks   105480 files
                                  total:   509932 blocks   129024 files
/devices           (/devices          ):        0 blocks        0 files
                                  total:        0 blocks      113 files
/system/contract   (ctfs              ):        0 blocks 2147483578 files
                                  total:        0 blocks       69 files
/proc              (proc              ):        0 blocks     1871 files
                                  total:        0 blocks     1916 files
/etc/mnttab        (mnttab            ):        0 blocks        0 files
                                  total:        0 blocks        1 files
/etc/svc/volatile  (swap              ):   992608 blocks    16964 files
                                  total:   993360 blocks    17025 files
/system/object     (objfs             ):        0 blocks 2147483530 files
                                  total:        0 blocks      117 files
/usr               (/dev/dsk/c0t0d0s6 ):   503774 blocks   299189 files
                                  total:  6650604 blocks   420480 files
/dev/fd            (fd                ):        0 blocks        0 files
                                  total:        0 blocks       31 files
/var/run           (swap              ):   992608 blocks    16964 files
                                  total:   992688 blocks    17025 files
/tmp               (swap              ):   992608 blocks    16964 files
                                  total:   992688 blocks    17025 files
/opt               (/dev/dsk/c0t0d0s5 ):    23914 blocks     6947 files
                                  total:    27404 blocks     7168 files
/export/home       (/dev/dsk/c0t0d0s7 ):    16810 blocks     7160 files
                                  total:    18900 blocks     7168 files