Linux to UNIX command

Hi,

I have the below command for Linux

find [deployment_directory] -iname '*.ear' -o -iname '*.war' | xargs grep -R org.apache.log4j

What is the HP-UX equivalent of this ?

Have you not tried simply?:

find [deplyment_dir]  -name '*.ear' -o -name '*.war' | xargs grep org.apache.log4j 

Linux usually comes with the GNU version of find. HP has the POSIX version. There are considerable differences. If you can, you should install the GNU utilities, and change your PATH to suite.

You will have to use name instead of iname cause of different find programs.
Also, vbe suggestion should be altred abit to achive linux find output.
... -name '*.[Ee][Aa][Rr]' ....

You can further fold the *.ear and *.war terms into a single predicate: -name '*.[EeWw][Aa][Rr]'

Same goes for the original, case-insensitive linux version.

Regards,
Alister