cygpath not able to convert Windows path to Linux path

Jeyaram picture Jeyaram · Sep 27, 2012 · Viewed 11.1k times · Source

Im trying to convert the file paths to/from Linux and Windows on Windows Machine.

unix path to windows works fine.

$ cygpath -w /cygdrive/c/CYGWIN/CYGBuild/build.mak
C:\CYGWIN\CYGBuild\build.mak

But windows path to Linux gives wrong output. i.e Missing '/' and also cygdrive

$ cygpath -u c:\cygwin\cygbuild\build.mak
c:cygwincygbuildbuild.mak

Anyone faced this issue?? Share your experience.

Thanks

Answer

Jeyaram picture Jeyaram · Sep 27, 2012

I got answer for this question.

cygpath -u 'c:\cygwin\cygbuild\build.mak'

i.e path should be given in single quotation.