Skip to content

Instantly share code, notes, and snippets.

@codfish
Created March 12, 2015 17:22
Show Gist options
  • Save codfish/10e5d5c562e5c8cf9d5c to your computer and use it in GitHub Desktop.
Save codfish/10e5d5c562e5c8cf9d5c to your computer and use it in GitHub Desktop.
Get number of files/directories, etc. in a specific directory (recursive).
# Files
find . -type f | wc -l
# Directories
find . -type d | wc -l
# Block special
find . -type b | wc -l
# Character special
find . -type c | wc -l
# named pipe
find . -type p | wc -l
# symlink
find . -type l | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment