Skip to content

Instantly share code, notes, and snippets.

@kargaranamir
Created March 10, 2023 22:09
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 kargaranamir/e65ec4d0a8d2564c547bbdfd979bd209 to your computer and use it in GitHub Desktop.
Save kargaranamir/e65ec4d0a8d2564c547bbdfd979bd209 to your computer and use it in GitHub Desktop.
Recursively find all files that match a certain pattern

Find files with ./XXX/XXX.md pattern:

find . -regex '.*/*/[^/]*.md'

Find number of files with ./XXX/XXX.md pattern:

find . -regex '.*/*/[^/]*.md' -printf '%i\n' | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment