Simpler for this particular case, perhaps, but less flexible and powerful.
Getting people to learn more about the find command is always a Good Thing.
Plus, I don't think your second example is going to do anyone any good.  The
"*" will expand to all file and directory names in the current directory,
the first of which will be used as the argument to search for in the rest of
them.


Mark Post

-----Original Message-----
From: Tzafrir Cohen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 3:46 PM
To: [EMAIL PROTECTED]
Subject: Re: HOWTO : Search


On Wed, May 28, 2003 at 11:01:48AM -0400, Post, Mark K wrote:
> find /etc -type f -exec grep -l /home {} \;

Or, simpler:

  grep -r /home .

or maybe just:

  grep * /home

Adding '2>/dev/null' in the end may also help in case of permission
problems you don't want to know about.

--
Tzafrir Cohen                       +---------------------------+
http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
mailto:[EMAIL PROTECTED]       +---------------------------+

Reply via email to