Friday, April 26, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 8605  / 2 Years ago, wed, march 23, 2022, 4:46:03

So when you want to search for a file with a filename containing the string xyz from a directory to all depths, you write



sudo find path -name '*xyz*'


How do I find all files without the string xyz?


More From » command-line

 Answers
5

Add a ! (not) before the expression:



sudo find path ! -name '*xyz*'

[#36834] Thursday, March 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
igeonlothe

Total Points: 370
Total Questions: 121
Total Answers: 114

Location: United States Minor Outlying Island
Member since Fri, Feb 5, 2021
3 Years ago
;