Cygwin help

Posted by Neves on Wed 30 Apr 2008 04:46 AM — 7 posts, 27,141 views.

USA #0
Not sure which forum to put this in, but I've been away for a bit and forgot everything, I thought ls was used to list a directory in Cygwin, but it isn't working, I reinstalled Cygwin in case it wasn't installed right, any ideas?

-Edge of Acedia

[EDIT by Zeno] This is the wrong section.
Amended on Wed 30 Apr 2008 04:51 AM by Zeno
Australia Forum Administrator #1
Yes, "ls" lists a directory. Make sure you have it in lower-case.
USA #2
Nope, not working, is it possible that the command isn't downloaded? How would I check?
USA #3
What is it doing, exactly? i.e. when you type "ls" what is happening?

The command should always be there; I think it's part of the "base" or "coreutils" package which is installed by default and without which Cygwin basically won't work. You would have had to go in and explicitly remove it for it to go away.
Amended on Thu 01 May 2008 04:51 AM by David Haley
Australia Forum Administrator #4
Can you copy and paste exactly what you do, and what you see?

Use the system menu (top left-hand corner) to select Edit -> Mark, then drag the mouse over the text and hit <enter> to copy it to the clipboard. Then paste the results here. This is what I see when I try it:


$ ls
lua-5.1.2              smaug17fuss.tgz         test.c
lua-5.1.2.tar.gz       smaug17fuss_lua_v4.tgz  test.exe

$


The "ls" part is my typing. That isn't "1s", you know. That is an L for List, not "1" as in the number one. That is, LS in lower case.

The command ls is short for list.
Amended on Thu 01 May 2008 06:19 AM by Nick Gammon
USA #5
bash: id: command not found
bash: /bin/test: No such file or directory

Mordy@D7X4L191 ~
$ ls
bash: ls: command not found

Mordy@D7X4L191 ~
$

I haven't used Cygwin in like two years, so it is possible some files were moved or lost in the interim, but I don't think so.

-Edge of Acedia
Amended on Thu 01 May 2008 07:51 PM by Neves
USA #6
Try:

echo $PATH

and:

/bin/ls

and let us know what those do.

Also, you might want to run the Cygwin setup program again to give it a chance to upgrade (and perhaps reinstall) packages. It is possible (likely, at this point) that your Cygwin installation got messed up somehow.