searching in files

Kevin Davidson kevin at
Fri Jun 27 04:28:58 CDT 2008

Not very Dell related, but you probably want something like this:

find . -name FILENAMEPATTERN -exec grep -n SEARCHPATTERN {} /dev/null \;

Which will search for strings matching SEARCHPATTERN in any file that  
matches FILENAMEPATTERN in the current directory or below. You will  
get the filename and line number of any matches. I suggest reading the  
man pages for find and grep. You may need to learn about filename  
globbing and regular expressions as well to refine this further. Good  

Kevin Davidson
Sent from my iPhone

indigospring :Making Sense of IT
t 0870 745 4001

On 27 Jun 2008, at 06:33, ammad shah <mammadshah at> wrote:

> Dear all,
> can i search a word from multiple files. i did the following but it  
> didn't worked.
> find   .  -name 06-22-2008 | grep "download"
> thanks.
> Introducing Live Search cashback . It's search that pays you back!  
> Try it Now
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at
> Please read the FAQ at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Linux-PowerEdge mailing list