Unix: Files starting with a dash, -
On my OSX (10.6.4) machine, I somehow managed to create a directory called "-v9" in the /var/root directory. How do I delete this directory?
Using the backslash to escape the minus doesn't seem to work:
# rm -r \-v9 rm: illegal option -- 9
Even using a wildcard won't work:
# rm -ri *9 rm: illegal option -- 9 usage: rm [-f | -i] [-dPRrvW] file ... unlink file
I tried to delete it using the Finder, but ran into a different problem. Because it's in the /var/root directory, the Finder won't display the contents of the folder. At least, it doesn't do this by default, and I don't know how to enable it (ditto for Path Finder).