Go to content Go to navigation Go to search

Knowing Your File System · May 30, 02:01 AM by Dylan Doxey

For a quick assessment of your drive space distribution and usage use the df command.

dylan@dev.doxey.org$: ~ df -h
Filesystem        Size  Used Avail Use% Mounted on
/dev/mapper/root   15G   14G  661M  96% /
varrun            2.0G   56K  2.0G   1% /var/run
varlock           2.0G     0  2.0G   0% /var/lock
udev              2.0G   40K  2.0G   1% /dev
devshm            2.0G     0  2.0G   0% /dev/shm
/dev/sda1         237M   24M  201M  11% /boot
/dev/mapper/home  440G  7.8G  410G   2% /home

The -h switch indicates human readable mode.
Gosh, looks like I ought to move some of my junk under /home.


For a more granular display of where the bulk of your stuff is, use the du command.

dylan@dev.doxey.org$: ~ du -h --max-depth=1
52K	./.subversion
7.6G	./rep
9.5M	./sandbox
45M	./.cpan
4.0K	./.gnupg
64K	./bin
128K	./.vim
7.7G	.

Again, the -h switch gives you the easier to read numeric values.
The --max-depth option let's you control the depth of the display. The default is unlimited depth.

Commenting is closed for this article.