Skip to content

Instantly share code, notes, and snippets.

@marianboda
Created May 3, 2016 06:33
Show Gist options
  • Save marianboda/8855a7dc0e0fe1202197c3c79310d790 to your computer and use it in GitHub Desktop.
Save marianboda/8855a7dc0e0fe1202197c3c79310d790 to your computer and use it in GitHub Desktop.
Recursively count files for every directory inside current dir
find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo $(find "{}" | wc -l) \\t "{}"' | sort -rn | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment