Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FleXoft/ac25354df3d04e53a5ad9e85bba6b633 to your computer and use it in GitHub Desktop.
Save FleXoft/ac25354df3d04e53a5ad9e85bba6b633 to your computer and use it in GitHub Desktop.
Recursively counting files in a Linux directory
find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo $(find "{}" | wc -l) "{}"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment