Linux/Unix – Check disk size…

 

Useful commands to check a directory size:

du -sk .

This will return the entire size of your Home directory.

du -k . | sort -nr | more

This will return the sizes of directories/files, sorted and displayed from largest to smallest.

du -k . | sort -nr | head -5

This will return the sizes of the 5 largest directories/files in your home directory.

ls -al | sort +4n

This shows up all the files order by size

du –si

This will show up a list with directories and subdirectories size

 

Advertisements

About msotela

This blog is for anyone who wants to access the power of a Linux system as a systems administrator or user. You may be a Linux enthusiast, a Linux professional, or possibly a computer professional who is increasingly finding the Windows systems in your data center supplanted by Linux boxes.

Posted on March 15, 2009, in Unix/Linux. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: