I have a filename with -v. I try to remove it by
rm -v or rm "-v" or rm \-v
But it shows something like
rm: missing operand
Try 'rm --help' for more information.
asked Jun 8, 2023 at 2:52
Jack jdeoel
4,5886 gold badges29 silver badges57 bronze badges
1 Answer 1
I have a filename with
-v
Try:
rm -- '-v'
If you need to use rm option like verbose for example, try:
rm -v -- '-v'
-- tells SHELL it's the end of options. And disables further option processing. So anything after -- will be treated as filenames.
Sign up to request clarification or add additional context in comments.
rm \-v..,