Can I modify the
rm command with regular expression or something to delete.
every file in current directory except files with extensions
*.png? It should be case insensitive because there are files like
@ChrisDown has given a
Remember to reset the two shell options to their default values. In my case
Or run those two commands in a subshell:
If you would like to see in advance what files will be removed, simply substitute the
If you would like hidden files to be removed as well, add the
If you are using
Otherwise you can us something like the following:
I would suggest that you take a little time and do this in multiple steps so you do not do anything accidently silly.