Saturday, May 4, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 8612  / 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
igeonlothe questions
Wed, May 31, 23, 02:34, 1 Year ago
Sat, Mar 12, 22, 17:13, 2 Years ago
Tue, Aug 31, 21, 09:46, 3 Years ago
;