Print Windows mapping of root path in MSYS Bash

0

In MSYS Bash I get:

$ cd ~             
$ pwd              
/c/Users/antonio 

but:

$ cd / 
$ pwd              
/

Can I get the full Windows absolute path from Bash?

antonio

Posted 2014-07-29T11:12:49.623

Reputation: 647

Answers

1

In recent versions, e.g. MSYS2, you can use:

~$  cygpath -w /
C:\path\to\root

or with a mixed path style:

~$  cygpath -m /
C:/path/to/root

Similarly, you might use:

~$  cygpath -w ~
C:\path\to\home
~$  cygpath -m ~
C:/path/to/home

antonio

Posted 2014-07-29T11:12:49.623

Reputation: 647