Re: Search certain string in a directory
- From: Steve Kemp <skx@xxxxxxxxxx>
- Date: Mon, 30 Apr 2007 06:36:45 +0100
On Sun, Apr 29, 2007 at 10:54:44PM -0700, Jeff D wrote:
I have a directory and several sub-directory and files reside within
it. I'm wondering is there any command I can use to search for the
certain tring's ocurence? Can any of you help me please?
find ~/tmp/ -type f -exec grep -l mystring {} \;
this will recursivly look for files in ~/tmp/ and print out files that
have mystring in them.
Of course grep has a -R flag for recursive operation ...
grep -R "some regexp" .
or.
rgrep "some string" .
Steve
--
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- References:
- Search certain string in a directory
- From: rocky
- Re: Search certain string in a directory
- From: Jeff D
- Search certain string in a directory
- Prev by Date: Re: to lvm or not to lvm?
- Next by Date: reporting problems with unstable
- Previous by thread: Re: Search certain string in a directory
- Next by thread: wx2.6-examples
- Index(es):
Relevant Pages
- RE: redhat-list digest, Vol 1 #8511 - 29 msgs
... To subscribe or unsubscribe via the World Wide Web, ... Command running
on terminal at some intervals (Reuben D. ... Re: bash shell ... rsync with
public/private keys/no passwords ... (RedHat) - RE: redhat-list digest, Vol 1 #8511 - 29 msgs
... To subscribe or unsubscribe via the World Wide Web, ... Command running
on terminal at some intervals (Reuben D. ... Re: bash shell ... rsync with
public/private keys/no passwords ... (RedHat) - Re: vim like completion in bash?
... If the OP still wants to make bash behave the same as mine -- among ... output
of the "shopt" command ... there might be compile-time options that are relevant
to TAB ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... (Debian-User) - hard drive repair problem
... booting and partitioning software from other OSs ... (e.g., DOS FDISK,
OS/2 FDISK) ... Command: p ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". ... (Debian-User) - Re: freebsd How do you restart rc.conf without rebooting
... >> rc.conf without rebooting. ... > As a matter of fact, I just performed
this command, and from what I ... To add, I left work, got home, and found my default route
did not get ... >> To unsubscribe, send any mail to ... (freebsd-questions)