I want to find all files/dirs that are not equal to .git*
, so I tried the following commands, but it has the opposite effect (it prints the paths that contain .git
).
$ find . ! -name "*.git"
$ find . ! -name ".*.git"
$ find . ! -name "*.git*"
$ find . ! -regex "*.git"
$ find . ! \( -name "*.git*" \)
I also tried the above commands with a \!
escape, as in find . \! -name "*.git"
.
Q: What's the correct syntax for find
"not equal to"?