JavaScript is required to for searching.
Oracle Technology Network
Library
PDF
Print View
Feedback

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)

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

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 13-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
/ (rpool/ROOT/solaris):100709074 blocks 100709074 files
/devices (/devices ): 0 blocks 0 files
/dev (/dev ): 0 blocks 0 files
/system/contract (ctfs ): 0 blocks 2147483601 files
/proc (proc ): 0 blocks 29946 files
/etc/mnttab (mnttab ): 0 blocks 0 files
/system/volatile (swap ):42191440 blocks 2276112 files
/system/object (objfs ): 0 blocks 2147483441 files
/etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files
/dev/fd (fd ): 0 blocks 0 files
/tmp (swap ):42191440 blocks 2276112 files
/export (rpool/export ):100709074 blocks 100709074 files
/export/home (rpool/export/home ):100709074 blocks 100709074 files
/export/home/admin (rpool/export/home/admin):100709074 blocks 100709074 files
/rpool (rpool ):100709074 blocks 100709074 files
/home/joey (home.domain:/export/home1/03/joey):960033722 blocks 67158851 files

Example 13-2 Displaying File Size Information in 1024 Bytes

In the following example, file system information is displayed in 1024 bytes on one line of information for each specified file system

$ df -h
Filesystem Size Used Available Capacity Mounted on
rpool/ROOT/solaris 67G 2.7G 48G 6% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 20G 704K 20G 1% /system/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
fd 0K 0K 0K 0% /dev/fd
swap 20G 0K 20G 0% /tmp
rpool/export 67G 32K 48G 1% /export
rpool/export/home 67G 32K 48G 1% /export/home
rpool/export/home/admin
 67G 33K 48G 1% /export/home/admin
rpool 67G 74K 48G 1% /rpool
home.domain:/export/home1/03/joey
 539G 81G 452G 16% /home/joey

Example 13-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
/ (rpool/ROOT/solaris): 100709077 blocks 100709077 files
 total: 140378112 blocks 100838460 files
/devices (/devices ): 0 blocks 0 files
 total: 0 blocks 456 files
/dev (/dev ): 0 blocks 0 files
 total: 0 blocks 681 files
/system/contract (ctfs ): 0 blocks 2147483601 files
 total: 0 blocks 46 files
/proc (proc ): 0 blocks 29946 files
 total: 0 blocks 30002 files
/etc/mnttab (mnttab ): 0 blocks 0 files
 total: 0 blocks 1 files
/system/volatile (swap ): 42190928 blocks 2276112 files
 total: 42192336 blocks 2276330 files
/system/object (objfs ): 0 blocks 2147483441 files
 total: 0 blocks 206 files
/etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files
 total: 0 blocks 1 files
/dev/fd (fd ): 0 blocks 0 files
 total: 0 blocks 31 files
/tmp (swap ): 42190928 blocks 2276112 files
 total: 42190928 blocks 2276330 files
/export (rpool/export ): 100709077 blocks 100709077 files
 total: 140378112 blocks 100709085 files
/export/home (rpool/export/home ): 100709077 blocks 100709077 files
 total: 140378112 blocks 100709085 files
/export/home/admin (rpool/export/home/admin): 100709077 blocks 100709077 files
 total: 140378112 blocks 100709086 files
/rpool (rpool ): 100709077 blocks 100709077 files
 total: 140378112 blocks 100709090 files
/home/joey (home.domain:/export/home1/03/joey): 960033724 blocks 67158850 files
 total: 1129776786 blocks 67966080 files
Copyright © 1998, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices
Previous Next

AltStyle によって変換されたページ (->オリジナル) /