Sometimes you can slip and create a file whose name starts with a dash
), like -output
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
This doesn't change anything as far as the command is
"look in the current directory" (1.21
So here's how to remove the file -f
commands have a special option for dealing with filenames
that start with a dash, but this trick should work on all