Directory size excluding sub-directories – Linux

To find the size of a directory which has several sub directories can be done by using the following command

du  -skh  /home/user

please note the “s” here used is lower case  if we use upper case then it will list size of all sub directories too….replace the /home/user with your folder name..

you can also use this command  to find total space used

du -ch | grep total
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s