find . -type f -name "config-*.json" | grep "prod" or # I'd personally use find, but you can glob for these things too: shopt -s globstar ls /etc/{,**/}*.conf # And you can use locate and it's fast but not reliable. locate '/etc/**.conf'