
MSYS Bash では次のようになります:
$ cd ~
$ pwd
/c/Users/antonio
しかし:
$ cd /
$ pwd
/
Bash から完全な Windows 絶対パスを取得できますか?
答え1
最近のバージョンでは、例えばMSYS2、次のものを使用できます:
~$ cygpath -w /
C:\path\to\root
または混合パススタイルの場合:
~$ cygpath -m /
C:/path/to/root
同様に、次のものも使用できます。
~$ cygpath -w ~
C:\path\to\home
~$ cygpath -m ~
C:/path/to/home