How to determine the folder size in Unix or Linux.

May 22, 2009
By Andrew Lin

The du command displays disk usage for each file or folder. You can use this command to find the size of a folder in Unix or Linux. Below are some examples.

du -s /home/andrew
19112204 /home/andrew
The above command displays the size of the folder /home/andrew. The option -s displays a summarized size, or total size. If you do not use the -s option then it will list the size of all files and folders in the path /home/andrew recursively.

du -sh /home/andrew
19G /home/andrew
Adding the -h option displays the size in human redable format.

For more detailed information and option for the du command, use the following command.
man du

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
  • del.icio.us
  • IndiaGram
  • IndianPad

Tags: ,

3 Responses to “ How to determine the folder size in Unix or Linux. ”

  1. Kelsey on February 7, 2010 at 2:12 pm

    I have already pointed out this informative blog to all my students! Well done and a big THANKS for the tips!

  2. Tyson F. Gautreaux on January 9, 2010 at 11:45 am

    Great information! Thanks!

  3. Gloria on November 28, 2009 at 6:56 am

    Thanks a lot! That’s a fine article. Looks good to me.

Leave a Reply