Operating System - Linux
1831336 Members
3130 Online
110024 Solutions
New Discussion

Ignore dash ' - ' directory prefix

 
SOLVED
Go to solution
jackfiled
Advisor

Ignore dash ' - ' directory prefix

Hi all
that's the problem here
I cannot mv or cd that directory.
name like -Biz it is directory.

[apeace@ecfarm1 event]$ mv -Biz
mv: invalid option -- B
Try `mv --help' for more information.

[apeace@ecfarm1 event]$ cd -Biz
-bash: cd: -B: invalid option
cd: usage: cd [-L|-P] [dir]

how can I work it fine?



3 REPLIES 3
Stuart Browne
Honored Contributor
Solution

Re: Ignore dash ' - ' directory prefix

Use the following syntax:

cd -- -Biz

The '--' says "don't treat any following -'s as switches".
One long-haired git at your service...
jackfiled
Advisor

Re: Ignore dash ' - ' directory prefix

Thank you for your help..^^
Paul Cross_1
Respected Contributor

Re: Ignore dash ' - ' directory prefix

Or:

#mv \-Biz