searching in files

Kevin Davidson kevin at indigospring.co.uk
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  
luck.

-- 
Kevin Davidson
Sent from my iPhone

indigospring :Making Sense of IT
w http://www.indigospring.co.uk/
t 0870 745 4001

On 27 Jun 2008, at 06:33, ammad shah <mammadshah at hotmail.com> 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 dell.com
> http://lists.us.dell.com/mailman/listinfo/linux-poweredge
> Please read the FAQ at http://lists.us.dell.com/faq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.us.dell.com/pipermail/linux-poweredge/attachments/20080627/bbbe756c/attachment.htm 


More information about the Linux-PowerEdge mailing list