• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Common Unix Shell Commands: ... > Getting Disk and Directory Informati...

Getting Disk and Directory Information: du, df

The du and df commands are great examples of where a command-line tool really shines. Finding out how much space your files are using, or how much space is left on your various assorted volumes and drives is not a pleasant process under the Finder. Certainly, the display of drive space on a volume that appears in the bottom of every Finder window is a convenient way to keep track of disk usage, but if you want to find out what drive has the most free space, there isn't a good way to see this information without either clicking through every drive and looking at the window, or running an auxiliary disk-monitoring tool like Disk Utility. At the command line, it's two keystrokes:

brezup:~ ray$ df
Filesystem              512-blocks     Used    Avail Capacity  Mounted on
/dev/disk0s3              20447232 16643456  3599304    82%    /
devfs                          186      186        0   100%    /dev
fdesc                            2        2        0   100%    /dev
<volfs>                       1024     1024        0   100%    /.vol
/dev/disk0s5              41418752 28786624 12632128    70%    /Volumes/Software
/dev/disk0s7              54263808 52485896  1777912    97%    /Volumes/Wills_Data
/dev/disk0s9              10223616  8979656  1243960    88%    /Volumes/DVD1
/dev/disk0s11             10223616  6687424  3536192    65%    /Volumes/DVD2
/dev/disk0s13             10223616  8662360  1561256    85%    /Volumes/DVD3
/dev/disk0s15              7665760  1582288  6083472    21%    /Volumes/CD
automount -nsl [299]             0        0        0   100%    /Network
automount -fstab [315]           0        0        0   100%    /automount/Servers
automount -static [315]          0        0        0   100%    /automount/static


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint