Cygwin - LS command not found

Discuss anything related to command line tools here.
Post Reply
Message
Author
castman
Posts: 179
Joined: Sat Jun 28, 2008 5:41 am
Location: Brazil, Sao Paulo
Contact:

Cygwin - LS command not found

#1 Post 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!

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#2 Post by m^(2) »


castman
Posts: 179
Joined: Sat Jun 28, 2008 5:41 am
Location: Brazil, Sao Paulo
Contact:

#3 Post 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.

Post Reply