Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using Mac OS X Snow Leopard and when I type

ls c *

this is what I get in my terminal:

clock:
PSD               demo.html         jquery.tzineClock script.js         styles.css

clock2:

clojure-presentations:
Clojure-1up.pdf            ClojureInTheField-1up.pdf  license.html
Clojure-4up.pdf            README
ClojureForRubyists-1up.pdf keynote

coffee-script:
Cakefile      README        bin           examples      index.html    package.json  test
LICENSE       Rakefile      documentation extras        lib           src           vendor

By default I am using Bash.

share|improve this question

migrated from stackoverflow.com May 22 '10 at 16:48

This question came from our site for professional and enthusiast programmers.

    
Now I realize that there was a space between c and star. And that caused all this trouble. Anyways learned something new. –  Nadal May 22 '10 at 16:54

4 Answers 4

up vote 5 down vote accepted

It's just drilling into all the directories that match on c*, which can be cured by saying

ls -d c*

instead.

share|improve this answer

ls c * lists the file c and all files/directories * One can configure the shell to stop at once, because c does not exist while you meant c*

share|improve this answer

That's how it shows the contents of directories. Did you mean to add -d?

share|improve this answer

Looks like sometrhing has aliases ls to ls -R.

What is the result of alias ls

Fix is probably

alias ls=
share|improve this answer
2  
No​, not this​. –  Ignacio Vazquez-Abrams May 22 '10 at 16:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.