How can I recursively find all files in current and subfolders based on wildcard matching?
How can I recursively find all files in current and subfolders based on wildcard matching?
Use find
:
find . -name "foo*"
find
needs a starting point, so the .
(dot) points to the current directory.
Piping find into grep is often more convenient; it gives you the full power of regular expressions for arbitrary wildcard matching.
For example, to find all files with case insensitive string "foo" in the filename:
~$ find . -print | grep -i foo
Questions
Answers
Tags
Users
Copyright © 2022