Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/lib/jed/doc/txt/ drwxr-xr-x | |
| Viewing file: Select action/file-type: This file documents rgrep, a recursive, highlighting grep program.
Currently, rgrep is only available on Unix systems. To build it, move to
the src directory for JED and enter: `make rgrep'.
Why use rgrep instead of more traditional Unix tools?
------------------------------------------------------
Unlike grep and egrep, rgrep has the ability to recursively descend
directories. The traditional way of performing this kind of search on Unix
systems utilizes the `find' command in conjunction with `grep'. However,
this results in very poor performance. Consider the tradional approach
where one wants to search the /usr/include directory for the string `FD_SET':
For this, one would use:
% find /usr/include -exec grep -l FD_SET \{\} \; -print
Ignoring the fact that the above expression looks complex, it failed to find
any occurence of FD_SET under the /usr/include directory of my Ultrix
system.
Now, if rgrep is used, one types:
% rgrep -lFr FD_SET /usr/include
which yielded: /usr/include/sys/types.h
The reason that `find' failed is that /usr/include/sys is a symbolic link to
/sys/h. `rgrep' was able to succeed because of the `-F' flag which telles
it to follow links. I looked in the man page for a similar option for
`find' but nothing turned up.
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0182 ]-- |