Remove all files but one with rm
In unix, to remove zip files in a directory one can simply type
How can one remove everything except zip files?
This appears to work. The ! represents "not".
extglob needs to be enabled in the shell behavior settings for this to work. It is probably already enabled... but if not, enable it with:
And after answering this... indeed Ignacio Vazquez-Abrams you are correct. It is pretty much duplicate.
Try creating a list then removing the file from the list.