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