ktl014
8/9/2017 - 6:38 PM

using ls to find specific files from https://askubuntu.com/questions/225621/how-to-search-for-all-the-files-starting-with-the-name-abc-in-a-

To complete existing answers:

ls

The default directory list utility ls can be used in combination with the shell's wildcards . To search for all files with pattern abc:

ls abc*   # list all files starting with abc---
ls *abc*  # list all files containing --abc--
ls *abc   # list all files ending with --abc
Note that the file extension is relevant for the search results too.

tree Install banshee

In case we need to list files in a directory tree we can also issue tree to search for a given pattern like:

tree -P 'abc*'  # list directory tree of file starting with abc---
tree -l 'def*'  # exclude files starting with def---
In this case, tree itself supports wildcards.