Linux Directory size command

To find the size of a specific directory use the following command.  If using / (root directory) you may need to run this using sudo.
du -chs /path/to/directory
-c - produces grand total
-h - human readable sizes (e.g. 1K, 25M, 3G)
-s - summarize (produces a total for each argument)
man du
for extra options
 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Categories: