Re: simple grep command....

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

 



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



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux