[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: simple grep command....



On Sat Feb 01 2003 at 08:11, "Bruce Douglas" wrote:

> A simple question... trying to do a search for a string in a file... i don't
> know where on my harddrive the file is, nor do i know the name!! thought the
> command should be something like:
> 	#grep -F -r "string" /
> 
> Obviously, it didn't work. In looking at the man page/examples on the net, I
> can't quite get the command right.....

	find / -type f -exec grep "string" /dev/null {} \;

(Although that's ugly, it will go through *every* file on your
system...  if you can narrow it down to a specific directory tree
then every file on your system won't need to be read).

> Thanks for any help!
> 
> -Bruce

Cheers
Tony





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]