« Finding new content in Drupal 6 | Main | Changing MySQL table prefixes »

November 01, 2010

Assess disk space usage in Ubuntu

The dual-boot install I am working out of is the first one I'd set up and the partition is quite small (30 gb). Last week, I finally filled it up (took over a year) and here is what I learned from the process.

To check your disk space usage from command line:
$ sudo df -h

The following command will show disk usage per directory (from this forum):
$ sudo du -sh /*
$ sudo du -sh /home/[user]/*

Cleaning up installer files may also help:
$ sudo aptitude clean

Sort by size:
$ sudo du -s /var/* |sort -n -r

Show hidden directories (see above link):
$ du -s */ .[^.]*/ | sort -nr

Posted by kkwaiser at November 1, 2010 04:31 PM


Login to leave a comment. Create a new account.