Question

command line shell

echo %PIG_HOME%
C:\cygwin\usr\lib\pig

cygwin

echo $PIG_HOME
C:\cygwin\usr\lib\pig

echo $( cygpath -u "$PIG_HOME" )
/usr/lib/pig

cd $( cygpath -u "$PIG_HOME" )
-bash: cd: /usr/lib/pig: No such file or directory

Question: why is cygpath not converting it to /cygdrive/c/cygwin/usr/lib/pig?

UPDATE:

The path to the pig folder is correct.

command line shell

C:\Users\john.doe> cd %PIG_HOME%
C:\cygwin\usr\lib\pig>

cygwin

john.doe@COMPUTER ~
$ cd /cygdrive/c/cygwin/usr/lib/pig/

john.doe@COMPUTER /cygdrive/c/cygwin/usr/lib/pig
$
Was it helpful?

Solution

With Cygwin,

C:\cygwin\lib\pig = /usr/lib/pig

and

C:\cygwin\usr\lib\pig = /cygdrive/c/cygwin/usr/lib/pig

This setup is by design.

The C:\cygwin\usr\lib folder is not created by any packages and should not be created by you either.

OTHER TIPS

Type mount in your terminal window.

My c:\cygwin\bin and c:\cygwin\lib\ are mounted at /usr/bin and /usr/lib respectively. I suspect that your c:\cygwin\usr\lib is mounted at /usr/lib.

Therefore, the "unix" path to c:\cygwin\usr\lib\pig would be /usr/lib/pig.

Did you try option "-m, --mixed : like --windows, but with regular slashes (C:/WINNT)"

$ cd /cygdrive/c/cygwin64/home
$  cygpath -m $(pwd)
C:/cygwin64/home
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top