How to invert a grep expression May 6, 2023 by Tarik Use command-line option -v or --invert-match, ls -R |grep -v -E .*[\.exe]$\|.*[\.html]$