Issue
I want to search a series of files based on the files name.
Here is my directory :
src="https://i.stack.imgur.com/VjuPR.png" alt="enter image description here">
For example I had the file on above.
I only want to search out the file which is without _bak.
Solution
If you're wanting to limit your search to the current directory, use:
find . -maxdepth 1 -mindepth 1 ! -name '*_bak'
If you want to recursively find in all directories remove the -maxdepth 1
.
Edit in response to OP's comment
To get files that begin with ei
and do not end with _bak
use:
find . -type f -name 'ei*' -a ! -name '*_bak'
Answered By - Tim Pote Answer Checked By - Senaida (WPSolving Volunteer)