4.3.3. 切换当前路径到别的磁盘,比如C盘,D盘等

Cygwin下,从当前路径切换到Windows中别的磁盘,比如C盘,之前的做法,是通过cygdrive:

CLi@PC-CLI-1 /cygdrive/c
$ pwd
/cygdrive/c

CLi@PC-CLI-1 /cygdrive/c
$ cd /cygdrive/d

CLi@PC-CLI-1 /cygdrive/d
$ pwd
/cygdrive/d
        

现在刚看到[1],才知道也可以直接通过C:的形式去切换到C盘了:

CLi@PC-CLI-1 /home/CLi
$ pwd
/home/CLi

CLi@PC-CLI-1 /home/CLi
$ cd C:

CLi@PC-CLI-1 /cygdrive/c
$ pwd
/cygdrive/c