[PLUG] Searching Files for Character String

Carlos Aguayo caguayo at gmail.com
Fri Dec 6 20:12:41 UTC 2013


If you're on linux, the grep family takes the -r flag for "recursive"
searches, e.g.


caguayo at dukie 207: fgrep -r authorized_keys ./keys
  ./keys/authorized_keys:# /etc/ssh/keys-root/authorized_keys
  ./keys/dir:/etc/ssh/keys-root/authorized_keys


Other versions of grep don't support that, so it gets a bit more
complicated, but not much.

Carlos


On Fri, Dec 6, 2013 at 12:11 PM, Scott Howard <SHoward at k-hlaw.com> wrote:
> Can someone point me to a program or method that will search the files on the hard drive for a character string.  I use locate for a filename string but I do not know how to search for a character string within a file.
>
> Thank you in advance.
>
> Scott Howard
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug



More information about the PLUG mailing list