Monday, July 15, 2013

Delete a file with special characters in Linux

Sometimes you can put command line parameters in wrong order, and have a file name starting with "--" as a result. If you'll try to use rm <file name> it will fail because it will assume that you are providing a flag to rm command.
In this case, use following command:
rm -- <file name>