Archive for December, 2006

rgrep equivallent on Solaris

There is no recursive grep function on Solaris. The work around that we use at work is,

find ./ -name *.java | xargs grep “mystring”

Suppose you want to find all Java class files under a given directory, including the sub directories, that use the resource bundle key “prop.file.path”

First part of the command returns all the files with .java extension -
find ./ -name *.java

The output of find command is given as input to the grep command using pipe symbol. xargs (http://en.wikipedia.org/wiki/Xargs) is used to split the large number of results returned by find command and pass it one by one to grep.

find ./ -name *.java   | xargs grep “prop.file.path”

Comments (1)

How to check RAM size on Solaris?

Use prtconf command. It is used to print system configuration.
 prtconf | head -3 |grep Mem

Comments (5)

Any javamonk interested in working at SUN Microsystems, India ?

Are you a Java/J2EE or C++ expert and excited about working on project glassfish and other opensource projects at SUN ?
Then, why waiting.. just forward your resumes to unnisworld-at-gmail-dot-com (subject line of your mail should start with SUN-glassfish).
Send resumes only if you or your friends think that you are strong in Java/C++ :D .

Leave a Comment