ls typically displays only the files and folders in the present directory. But once you add a wildcard it starts searching in sub-directories.

example:

$ ls
fight_folder    file1       file2

$ ls f*
file1   file2

fight_folder:
file3

How do you limit the scope to only the current directory?
Using OS X

link|improve this question

73% accept rate
feedback

1 Answer

up vote 2 down vote accepted

ls -d suppresses listing the contents of directories listed on the command line (via the wildcard).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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