How do I list every other file extension using regex on Linux?
Just negate the condition
-not -regex '.*/.*\.swf'
If all you want are the files that don't have the .swf
extension, just use reverse grep
:
find . -maxdepth 1 -type f | grep -v *\.swf
Or, negate the -name
with find:
find . -maxdepth 1 ! -name "*\.swf"