Complete.Org: Mailing Lists: Archives: linux-help: September 2000:
[linux-help] Re: ls
Home

[linux-help] Re: ls

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: ls
From: Bruce Bales <bbales@xxxxxxxxxxx>
Date: Sat, 02 Sep 2000 20:33:31 -0500
Reply-to: linux-help@xxxxxxxxx

You're right, Greg.  With more experimentation, I figured out what I was seeing.

In /etc, if I type "ls  is*" , I get the files starting with "is" and all the 
files in
__directories__ starting with "is".

Sorry about that.
bruce

Greg House wrote:

> No. It only shows the ones in the current directory. I'm running Mandrake 
> (7.0)
> and I just tried it. I have a file called x.html in a subdirectory, I touched
> two files in the directory above it, x1.html and x2.html. I do ls x* and I get
> only the files in the directory I'm in. I do find . -name "x*" and it finds
> all three (and a bunch of other junk starting with x under .kde, .netscape,
> office52, etc).
>
> ls has always searched only the current directory. To change it to do
> subdirectories would totally screw lots of people up.
>
> Greg
>
> On Sat, 02 Sep 2000, you wrote:
> > In Mandrake, ls lar* will show all non-executable files beginning with lar 
> > in the
> > directory and subdirectories.  Executable files won't be shown.
> > bruce
> >
> > Carl D Cravens wrote:
> >
> > > On Sat, 2 Sep 2000, Gary Gaston wrote:
> > >
> > > > To look for a file that starts with "set" use the following:  ls set*  
> > > > This
> > > > will search the current directory and all subdirectories.
> > >
> > > Eh?  ls doesn't search subdirectories.  "set*" is expanded by the shell,
> > > before it's ever sent to ls, into files that match in the current
> > > directory.  It'll show you the contents of any directories that start with
> > > "set" in the current directory, but it won't look any further than that.
> > >
> > > To search for a file, use "find".
> > >
> > > find ./ -name 'set*'
> > >
> > > "xargs" is a good program to know about when using find.  It's usually
> > > more efficient that the -exec option of find if you want to execute a
> > > program on the results.
> > >
> > > find ./ -name 'set*' |xargs ls -ld
> > >
> > > --
> > > Carl D Cravens (raven@xxxxxxxxxxx)
> > > I've got a chainsaw... what could go wrong?
> > >
> > > -- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
> > > visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
> >
> >
> > -- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
> > visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
> --
>
> ----------
> "Hang loose, baby. You'll get your new wings soon." - Is. 40:31
>
> -- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]