Re: help with ls
Toby <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
Eric Koldeweij wrote:
> Don't use ls in this case. Second, using "*.conf" in grep doesn't work
> the way you want it.
>
> Try this:
>
> find / -type f \( -name "*.conf" -o -name "*.cfg" \) -print
>
> or, if you want to have an ls -ls listing for each file, do:
>
> find / -type f \( -name "*.conf" -o -name "*.cfg" \) -exec ls -ls {} \;
>
could just use -ls directly, no need for the -exec. One thing to
remember with find is to use -mount to restrict it to the target
fs/partition, especially when you have several huge nfs mounts :)
> I suggest getting very familiar with the "find" command. It's syntax is
> difficult but it is an extremely powerful tool and it can do almost
> anything short of frying an egg ;)
>
One of my favorite tools . . . .
-toby