du -csh *
The -c option can be added to provide a grand total for all of the files and directories that are listed.
The -s (for suppress or summarize) option tells du to report only the total disk space occupied by a directory tree and to suppress individual reports for its subdirectories.
The -h (i.e., human readable) can make the output easier to read by displaying it in kilobytes (K), megabytes (M) and gigabytes (G) rather than just in the default kilobytes.
Reference
http://stackoverflow.com/questions/10103604/linux-command-line-du-how-to-make-it-show-only-total-for-each-directories
No comments:
Post a Comment