Tuesday, 16 December 2014

Get the directory size from the terminal


Getting the size of the directory is easy with the du command, but if you want to get the size of all files in the directory  which should not include the sub-directory, you can use the command given below:

$ls -hs | head -1

This will give you the desired size.

No comments:

Post a Comment