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 18:38:20 -0500
Reply-to: linux-help@xxxxxxxxx

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


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