Friday, January 21, 2011

OS X/Linux Command to Display Total Size of All Directories and Subdirectories Within Current Directory

Jim just taught me this, which rolls up the sizes of subdirectories to provide a total size of each directories in the current directory in *nix:
du -sch *
I'd used 'du -h' before quite a bit which shows sizes throughout directories recursively. With larger directories, it is helpful to sort and axe the human-readable sizes with 'du -sk * | sort -nr'. 'df -H' is also very helpful to show volume sizes.

No comments: