Mohan Cheema's Online Diary

Site Just to Keep Track of My Day to Day Work.

Solaris Recursive GREP

| 0 comments

Linux shells provide a recursive Grep function in the form of the -r switch.

However, in Solaris this function have to be replicated using the piped command as follows:

find . | xargs grep ‘pattern’

Or if your shell doesn’t has all the right paths set, then:

/usr/bin/find . | /usr/bin/xargs /usr/bin/grep ‘pattern’

Share

Author: Mohan Cheema

I am a Commerce Graduate currently I am working as Senior Support Analyst (Linux Administrator) with medium sized MNC Company. If time permits I do freelance work like setting up the servers as per the requirement, do performance tuning and so on.

Leave a Reply

Required fields are marked *.

*

* Copy this password:

* Type or paste password here:

2,912 Spam Comments Blocked so far by Spam Free Wordpress


CommentLuv badge

Notify me of followup comments via e-mail. You can also subscribe without commenting.