How to list file names within a folder based on a pattern?
- By
- On 29/01/2020
- Comments (0)
- In Unix/Linux
If you want to search for files with name containing "*pattern*" in all subdirectories:
find /path/to/folder -type f -name "*pattern*"
And to search to a certain depth "alpha" of subdirectories use the following command:
find /path/to/folder -maxdepth alpha -type f -name "*pattern*"