Sometimes you can slip and create a file whose name starts with a dash
-), like -output or -f.
That's a perfectly legal filename.
The problem is that UNIX command options usually start with a dash (
If you try to type that filename on a command line, the command might
think you're trying to type a command option.
In almost every case, all you need to do is "hide" the dash from the
Start the filename with
./ (dot slash).
This doesn't change anything as far as the command is
./ just means
So here's how to remove the file -f:
(Most rm commands have a special option for dealing with filenames that start with a dash, but this trick should work on all UNIX commands.)