I have 100s of main directories where I have multiple subdirectories in each main directory and a few subdirectories within each subdirectory. I want to get all the files that match pattern in file name mypattern
anywhere in any of those directories/subdirectories. Is there a way to do it?
find <root directory> -name *pattern*
ex: find . -name *nix*
find . -name *nix*
Sure. This really isn't a programming question, though...
find . -regex '.*regex_here.*'
Have a look at man find
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.