Under Linux, sometimes you need to find some files, there are times these file formats are not uniform and specification, but the files that need to be excluded are uniform format, you can use the reverse function of the Find command
The general command to find files with find is:
Find. -name "*.tar.*"-o-name "*.patch"
This means finding files with the. Tar. character Or.patch characters in the file name.
Now to exclude these files, think Grep/ack/ag have a function called-revert, is to find the content is not the target string, find no, but it provides a more powerful! Non-command.
Find. \ (\!-name "*.tar.*" \)
In this sentence () is the meaning of the expression (expr) used, and then one of them! The result can be reversed.
Find. \ (\! \ (-name "*.tar.*"-o-name "*.patch" \) \)
This is the same thing, but when you use the-o command, you need to add a second layer of parentheses.
Linux find inversion finds results that are not found