bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject given!)


From: Hans-Bernhard Broeker
Subject: Re: (no subject given!)
Date: 19 Apr 2001 17:14:38 GMT

Chen Yong [PG] <address@hidden> wrote:

>       cd /
>       grep -r "pattern" *

The '-r' option to grep is not, and cannot really be, a replacement
for the "real thing": a properly set up "find" command. Using

        find / -type f | xargs fgrep "pattern"

would have got you a better result, in a more classical Unix fashion.

And of course, unless you happen to be 'root' on that machine, it's
almost certainly a waste of CPU time to search the whole filesystem.
Searching that part of it you have write permission for (usually no
more than $HOME, /var/tmp and /tmp, effectively) should be enough.
-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.



reply via email to

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