Skip to content

Instantly share code, notes, and snippets.

@EvanLovely
Last active April 8, 2018 10:24
Show Gist options
  • Save EvanLovely/15fdbc96c04655743b7d to your computer and use it in GitHub Desktop.
Save EvanLovely/15fdbc96c04655743b7d to your computer and use it in GitHub Desktop.
bash function: find how many of a file type are here
  • Install: Add code to ~/.bash_functions
  • Useage: howmany md
  • Returns: a number for how many files with an extension of "md" exists in your current directory and all sub-directories
# find how many of a file type are here
howmany () {
find . -name "*.$1" | wc -l
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment