I have a file with joker character patterns:
From the current directory I would like to recursively get the list of files that do not match these patterns.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
find . -type f \! \( -path '*/include/*' -o -path '*/src/*' \)
\!is negating the group
\( ... \)is how to do groups of conditions for
If you have a new enough version of
find, you could enhance it with:
find . -type f -regextype posix-egrep -regex \! -path '.*/(include|src)/.*'