LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
LinkBack Search this Thread
Old 03-09-2005, 08:45 AM   #1
learnfast
Member
 
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70

Rep: Reputation: 15
ls question: how to avoid listing contents of subdirectories


when I type:

ls -al x*

I get not only the files that start with "x" but also the DIRECTORIES that begin with "x" AND their contents.

How can I just get the files and directories (as in MS-DOS: dir x*)

thanks.
 
Old 03-09-2005, 08:49 AM   #2
learnfast
Member
 
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70

Original Poster
Rep: Reputation: 15
Red face

let me answer my own question (from man ls)

ls -ald s*

works like in ms-dos
 
Old 03-09-2005, 08:59 AM   #3
learnfast
Member
 
Registered: Mar 2005
Location: berlin
Distribution: Redhat 9, Fedora 3
Posts: 70

Original Poster
Rep: Reputation: 15
ok, THIS may work fine:

ls -ald s*

but if I type:

ls -ald

thinking that I am going to get ALL files and directories, it only lists:

.

it only works if I type:

ls -ald *

odd, but ok.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Viewer question (view images subdirectories) gflores Linux - Newbie 1 02-21-2005 01:25 AM
where to find listing of distribution contents? mfeat Fedora 3 09-21-2004 11:13 AM
question about chmod and subdirectories Lleb_KCir Linux - General 2 07-28-2004 09:55 AM
listing groups question?? samills70 Red Hat 1 06-11-2004 12:59 PM
Apache directory listing question ScreeminChikin Linux - Software 6 04-15-2004 02:33 AM


All times are GMT -5. The time now is 08:06 PM.

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