Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-25-2004, 09:00 PM   #1
Registered: Mar 2003
Location: Bible Belt USA
Distribution: Debian
Posts: 91

Rep: Reputation: 15
I want ls to not display contents of directories

Lets say I had a folder called ~. Now in ~ is two folders called foo and bar. foo for some reason has 8 billion files in it! Unfortunately, I can't remember if foo is spelt 'foo' or 'fuu' so I type in 'ls f*'. Unfortunately, instead of just getting all of the files in ~ that start with an f, I get all the files in foo as well. Thus I have to scroll up to find the info I was looking for.

How do I tell ls to only display the names of the files in a folder and not to display the name of files in folders that happen to start with the same char?
Old 01-25-2004, 09:07 PM   #2
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55

ls -d f*

Old 01-26-2004, 03:47 AM   #3
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
im not exactly sure what u mean , but in the bash profile what alias u got for the comand ls (if theres one that tells ls to be recurive then take out whatever makes it recursive i think its -R ? ls --help for more info


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
directories first in ls display? gjhicks Linux - Newbie 9 07-15-2009 12:51 PM
Can't get intallpkg to display contents of slack-desc in custom packages. jtX Slackware 4 03-16-2004 02:22 PM
Apache2: How to allow Apache to display contents in the file system? vous Linux - Software 1 02-03-2004 05:36 AM
Contents of multiple directories in one playroll Linux - Newbie 2 11-17-2003 02:17 PM
Konqueror won't display Windows FTP contents tx29219 Linux - Software 1 02-27-2003 09:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration