How to cd into a directory with space in the name?

前端 未结 14 2382
独厮守ぢ
独厮守ぢ 2020-11-27 05:30

I\'m attempting to get into the directory /cygdrive/c/Users/my dir/Documents:

$ DOCS=\"/cygdrive/c/Users/my\\ dir/Documents\"

$ echo $DOCS
/cyg         


        
14条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 05:58

    To change to a directory with spaces on the name you just have to type like this:

    cd My\ Documents

    Hit enter and you will be good

提交回复
热议问题