The Cygwin 'cd' command always tells me "There is no such file or directory",

When entering the cygwin terminal and type:

cd "cygdrive/c/existing/path" 

he tells me: "There is no such file or directory." I am sure that the path exists ... did I miss the special cygwin package or do I have a false configuration? I am puzzled ...

This behaves the same way when I try to call cygwin bash from a Windows batch file. what I basically want to do is create a Windows batch file that launches cygwin and runs a shell script with the specified working directory, as described in this blog post: http://blog.dotsmart.net/2011/01/27/executing -cygwin-bash-scripts-on-windows /

my batch file seems to work, it executes the following command:

 %_CYGBIN%\bash.exe --login "cd %_CYGPATH%" "./%_CYGSCRIPT%" 

but cygwin will not execute the 'cd' command. The console output of my batch file:

 /usr/bin/bash: cd /cygdrive/c/existing/path: No such file or directory 
+6
source share
1 answer
 cd '/cygdrive/c/existing/path' # ^ # \ # --- need forward slash (/) before the "c" 
+9
source

Source: https://habr.com/ru/post/945607/


All Articles