How to invert a grep expression
grep -v
or
grep --invert-match
You can also do the same thing using find
:
find . -type f \( -iname "*" ! -iname ".exe" ! -iname ".html"\)
More info here.
Use command-line option -v
or --invert-match
,
ls -R |grep -v -E .*[\.exe]$\|.*[\.html]$