Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] search files for "text string"
Date: Sat, 06 Jun 2015 23:40:52
Message-Id: 20150607004037.56065f49@digimed.co.uk
In Reply to: Re: [gentoo-user] search files for "text string" by Philip Webb
1 On Sat, 6 Jun 2015 13:11:04 -0400, Philip Webb wrote:
2
3 > > I've bunch of php files in many directories
4 > > and I need to find a text string in them "Check/Money Order"
5 >
6 > 'cd' to the lowest dir which contains them all,
7 > then 'grep -r "Check/Money Order" *.php'.
8
9 That will only search *.php files in the current directory, you need
10
11 grep -r --include='*.php' 'Check/Money Order' .
12
13 or drop the --include option to search all files. Use single quotes to
14 stop the shell from trying to interpret anything.
15
16
17 --
18 Neil Bothwick
19
20 Why do they call it a TV set when you only get one?

Replies

Subject Author
Re: [gentoo-user] search files for "text string" Volker Armin Hemmann <volkerarmin@××××××××××.com>