Wednesday, November 16, 2011

Getting folder size in linux

I have been looking for this for a while. Felt bad that I could not figure this simple this by man page.

Below is the command to find size of a folder in unix shell 

du -sh dir1  or du -sh .          
-s   tells du you want to see entries for just the specified directories, rather than for all subdirectories                          
h -  Show in human readable