I have a problem using bash. Simply, I cannot find the right command (if there's one!) to enter in the "- Arch_02 -" directory. As you can see, the name begins with a hyphen and this is causing some trouble:
localhost arch2 # pwd
/mnt/arch2
localhost arch2 # ls -l
total 4
dr-x------ 1 root root 4096 2007-04-29 20:09 - Arch_02 -
dr-x------ 1 root root 0 2006-12-10 18:14 RECYCLER
dr-x------ 1 root root 0 2006-12-02 22:24 System Volume Information
localhost arch2 # cd -\ Arch_02\ -
bash: cd: - : invalid option
cd: usage: cd [-L|-P] [dir]
localhost arch2 # cd "- Arch_02 -"
bash: cd: - : invalid option
cd: usage: cd [-L|-P] [dir]
localhost arch2 # cd '- Arch_02 -'
bash: cd: - : invalid option
cd: usage: cd [-L|-P] [dir]
localhost arch2 # cd - -\ Arch_02\ -
/root
localhost ~ # cd /mnt/arch2
localhost arch2 # cd - "- Arch_02 -"
/root
If I use csh instead, I can regularly access the directory by issuing the command:
(localhost:/mnt/arch2) # cd "- Arch_02 -"
(localhost:/mnt/arch2/- Arch_02 -) # pwd
/mnt/arch2/- Arch_02 -
With bash completion, if I press tab while typing directory's name, I can also see the subdirectories under "- Arch_02 -", but cannot access them with cd!
Does anyone have the answer?
Thanks a lot!