JoomlaTemplates.me by HostMonster Reviews

How to find directory size and disk free space in Linux

Published: Wednesday, 22 January 2014

How to find directory size and disk free space:

1) command: du -sh /home/*

example:
tokunbo@debian7:~$ du -sh /home/*
40M /home/downloads
4.0K /home/web
20K /home/testuser
16G /home/tokunbo
tokunbo@debian7:~$

then to find details of directories under "/home/tokunbo":

command: du -sh /home/tokunbo/*

Just keep on adding the directories / subdirectories to know which file/s / DIR is eating up your diskspace. For example:

command: du -sh /home/tokunbo/subdir1/subdir2/subdir3/*

Another good command to bear in mind is:

command: df -h... outputs disk usage in human readable format, showing percntage used/available, etc

References:

Add comment


Security code
Refresh