Monday, June 13, 2011

Unix - Commands to find disk usage

df: (disk free)
Df –k <directory name>
e.g. df –k . or df –k /
 
du: (disk usage)
The disk usage (du) command shows the size of each file or directory in the current directory:
  y> du -sk * | sort -n
The "s" option returns a summary of a directory's contents (rather than a full listing), and the "k" option shows the output in 1 KB increments (rather than the default 512 byte increments). The sort command lists them in ascending size order, with the largest directory last.

This will show which directory is using your space, "home," "pub," or "mail." (Ignore the "backup" directory; that is for the nightly backup snapshot and does not impact your disk usage.)

  y> du -sk * | sort -n
  6234    mail
  6018    pub
  182819   home
  95045   backup
In this example, the home directory is where most of the space is being used: almost 183 MB.

5 comments:

  1. :: https://services.github.com/ lemme be url bull dozern https://bloggingsl.net/tag/312/ losten pi-wholed$::||

    ReplyDelete
    Replies
    1. && f00tours http://rmautobuzz.com/10-best-super-cars-2017/?utm_source=Contentad&utm_medium=CPC&utm_campaign=Auto%20-%20Contentad%20-%20CPC%20-%202017%20super%20cars%20-%20deskusa

      Delete
    2. Multicast Protocols Feature Guide for the NFX250 Network Services ...
      www.juniper.net/techpubs/en_US/junos15.1/.../multicast.html
      Juniper Networks

      Delete
  2. :: http://stackoverflow.com/questions/tagged/bigdata

    ReplyDelete