How can I remove a file that looks like a flag? [duplicate]
Solution 1:
The "--" argument to mv
surely works (it means: "stop to interpreting strings starting with -
as options from now on"), but it is worth to know also
rm ./-v
which will work also with commands that do not have the "--" flag.
EDIT: well-behaved commands should respect the --
flag. But you never know.
Solution 2:
rm -- -v
--
signifies end of options.