Use du command to see file and folder sizes

Published on November 21, 2010, by in linux, osx, sysadmin.




How can I see the size of files and folders from the command line?

Use the command du to quickly list sizes!

A command I like to use is:

du -hsc *

This will provide a listing of file and folder sizes from your current working directory, including a total size amount at the bottom.

Here is a random example of me running this to check my home directory:






Related posts:

  1. Tar Bzip2 a Directory in Linux
  2. Repair /etc/passwd and /etc/group

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Use du command to see file and folder sizes
© Copyleft scottlinux.com CC BY-SA 3.0