Page 1 of 1

Cygwin - LS command not found

Posted: Tue Mar 03, 2009 2:08 pm
by castman
I have installed Cygwin and I noticed no matter if I install to the default root folder, I cannot list directories.

Cygwin can't be portable as I heard from m^2 without some modifications. I have no lucky searching through the web about it.

I installed on limited account using XP SP3. Could anyone help me solving this? Thanks!

Posted: Tue Mar 03, 2009 2:14 pm
by m^(2)

Posted: Tue Mar 03, 2009 4:21 pm
by castman
OK, it worked. I changed a little bit the code so it now runs from a directory with spaces.

Code: Select all

for /F "delims==" %%A in ('cd') do set WD=%%A
set path=%WD%\bin;%WD%\usr\X11R6\bin;%path%
set SHELL=/bin/bash
set CYGWIN=codepage:437
set HOME=/home/bruno
bin\mount -bfu "%WD%/" /
bin\mount -bfu "%WD%\bin" /usr/bin
bin\mount -bfu "%WD%\lib" /usr/lib
bin\bash --login -i
LS command is now working. However it still doesn't shows LS in the help reference. If compiling will work, I should be fine now.

Edit1: I've learned the same lesson again: Don't use spaces :P .

Edit2: Now I notice that I even don't need this .bat file as long as I don't change Cygwin place (what parcially was causing the bug).

And Cygwin wil work as long as I don't use directories that have spaces in the path.