Operating System - HP-UX
1836617 Members
2033 Online
110102 Solutions
New Discussion

Re: finding a word in file systems

 
SOLVED
Go to solution
Shivkumar
Super Advisor

finding a word in file systems

Hi,

What is the syntax to find a particular word in a directory and its sub-directories ?

Sorry to ask such a simple question. I have noted somewhere but not able to trace it now.

Thanks,
Shiv
1 REPLY 1
James R. Ferguson
Acclaimed Contributor
Solution

Re: finding a word in file systems

Hi Shiv:

A simple shell-based answer to your question could be:

# find /path -xdev -type f -exec grep -w something {} \+

...change the word "something" to whatever you need.

Regards!

...JRF...