Skip to content

Instantly share code, notes, and snippets.

@cuibonobo
Created March 23, 2014 15:49
Show Gist options
  • Select an option

  • Save cuibonobo/9724980 to your computer and use it in GitHub Desktop.

Select an option

Save cuibonobo/9724980 to your computer and use it in GitHub Desktop.
Getting the size of all files in a directory. The OS returns the value pretty quickly, but for large directory trees it can take a while. For example, it took about 40s to report the size of a 160GB directory.
du -sh /path/to/directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment