Posted under » Linux on 7 September 2010
I'm having problems deleting a folder with a special character. The folder (volume actually) "-n driven" will not remove from my directory. This is after I installed Tuxera's NTFS-3G on my mac.
Trick is to use "--". Any arguments after the -- are treated as file names and arguments. An argument of - is equivalent to --.
$ touch -- -123 $ ls -l -- -123 -rw-r--r-- 1 abcdefgh g900 0 Dec 9 07:17 -123 $ rm -- -123 $ ls -l -- -123 ls: -123: No such file or directory