Is there a simple way to recursively find all files in a directory hierarchy, that do not end in a list of extensions? E.g. all files that are not *.dll or *.exe
Linux/OS X:
Starting from the current directory, recursively find all files ending in .dll or .exe
find . -type f | grep -P "\.dll$|\.exe$"
Starting from the current directory, recursively find all files that DON'T end in .dll or .exe
find . -type f | grep -vP "\.dll$|\.exe$"
Notes:
(1) The P option in grep indicates that we are using the Perl style to write our regular expressions to be used in conjunction with the grep command. For the purpose of excecuting the grep command in conjunction with regular expressions, I find that the Perl style is the most powerful style around.
(2) The v option in grep instructs the shell to exclude any file that satisfies the regular expression
(3) The $ character at the end of say ".dll$" is a delimiter control character that tells the shell that the filename string ends with ".dll"