Cygwin help

Posted by Whofoobar on Wed 27 Sep 2006 01:00 PM — 17 posts, 58,515 views.

#0
i cant seem to get the ls command to work on Cygwin. i reinstalled it many many times, but it doesnt work and i cant find my start-up directory.
USA #1
I using ls in the dir where all the bins are (such as ls).
USA #2
I don't think it's easily possible, really, to have a Cygwin install without 'ls'. Could you be more specific about what is broken with 'ls'?
#3
i mean that it doesnt recognize the command, even though it is in the bin folder
USA #4
Like I said, it's almost impossible to break ls. Could you show us exactly what you are doing and what error message it gives you?
#5
all i am typing is ls, and it says bash: ls: command not found
USA #6
If you're in bin, then using ls should work (if it's there).
USA #7
Or type /bin/ls from a Cygwin prompt.

It baffles me that you would not have ls unless you did something very strange when installing Cygwin. If you look in c:\cygwin\bin, do you see ls.exe in there?
USA #8
I think I've had this problem before (but running it bin worked fine), probably has to do with it not being correctly linked or something. Perhaps Cygwin is installed in a dir that has spaces.
#9
it is there, but it just wont work
#10
no spaces in directory either it is in C:\cygwin
Australia Forum Administrator #11
Sounds like you have a corrupted PATH environment variable. Look at this:


$ which ls
/usr/bin/ls

$ echo $PATH
/usr/local/bin:/usr/bin:/bin


First, my copy of ls is in /usr/bin/ls, not /bin, and my PATH variable has it in it.

Try typing 'echo $PATH' and see if the correct directories are in it. Also, as Ksilyan says, you should be able to invoke it directly, like this:


$ /usr/bin/ls
MudGameProgramming         lua_example               rom24.zip  ... etc. 


#12
im just gonna totally uninstall and reinstall
USA #13
If it still doesn't work, then I'd suggest going to Cygwin's mailing list for help.
USA #14
Have you tried invoking it directly? It would help if you followed up on our suggestions like that so that we can narrow down the problem.

For instance, "it is there, but it just wont work" can mean at least two things:
1. it is located in the proper directory but typing "ls" doesn't work
2. typing /usr/bin/ls (or whatever -- wherever it's located) does not work either, which is more serious

If you uninstall I would recommend completely deleting your c:\cygwin directory before reinstalling.
#15
say im not getting that error anymore after a reinstall
USA #16
OK, something funny must have happened during the install then; either the download didn't go right, or you (un)checked the wrong button, or something like that. Good that all is working now. :-)