rm -rf a file starting with -
I have two files I want to get rid of, but they are
-send.xml -.xml so when I try to rm -rf -send.xml I get rm: invalid option -- s Try `rm --help' for more information. same problem with -.xml I tried mv and I get mv: invalid option -- . Try `mv --help' for more information. adding quotes doesn't help, I tried \-send.xml and that doesn't work. How do you handle files that start with - ? |
just add -- before the file
e.g.: Code:
rm -rf -- -send.xml its in man rm Code:
To remove a file whose name starts with a `-', for example `-foo', use |
All times are GMT -5. The time now is 01:44 AM. |