Sunday, October 25, 2009

Linux CLI - Check size of Directory and sub-directories

1. Display free disk space

df --


2. Display disk usage statistics

du --


Example:


1. Check disk total free space
df -h


2. Check size of directory by list down all the contents
du -ah /path/to/dir



3. Only display total directory size
du -sh /path/to/dir



p/s - normally I only use du -sh & df -h

No comments:

Post a Comment