How to find size of directory or files in Linux

 

For finding total size of files:

du -bc <file_name>
Example: du -bc *trm

For finding folder/file size:

du -sh <folder_name>

For finding multiple folder size :

du -sh *

For finding output of each an every directory or file size:

du -s * | sort -rn | cut -f2- | xargs -d "\n" du -sh
Please share If you like..Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on Yummly

6 Comments

Add a Comment
  1. Last one is really good

  2. Appreciated.. Thanks

  3. beYou deifliteny know how to bring an issue to light and make it important. I cant believe youre not more popular because you definitely have the gift.

  4. That’s the thkinnig of a creative mind

Leave a Reply

Your email address will not be published. Required fields are marked *

Fariddin Shaikh's Oracle DBA Blog © 2016 Being DBA
Go Back