cmd

Recursive grep in Solaris

$ find . | xargs grep PATTERN

In Solaris, the grep command does not have the -R (-r, –recursive) option which reads all files under each directory, recursively. The above command can be used to do the same in Solaris.

1 Comment

  • On 02.10.09 commandliners » Some xargs said:

    […] has already mentioned it, but xargs is sometimes much more useful than what it looks like. Two examples come to […]

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields