Handling filename beginning with '--' in bash
Hello,
I accidentally created a filename that begins with `--exclude` (while running a careless tar command). Now, everytime I try to rename or delete this file, I get an error: Code:
unrecognized option `--exclude=` Can anyone please tell me how to get rid of this odd file? FYI, I'm on bash. Thanks in advance, VJ |
Sorry, found a solution myself. I'm blind... it was right there in the rm man page. Had to use either:
Code:
rm -- -foo VJ |
Use the "--" before the filename to terminate the list of options:
Code:
mv -- --exclude |
All times are GMT -5. The time now is 04:33 AM. |