how to exlude certain directory from grep search path
From: H. S. (g_reate_xcalibur_at_yahoo.com)
Date: 08/30/05
- Next message: chris.kernaghan_at_gmail.com: "Linux Media player laptop"
- Previous message: JDS: "Re: Ooops, I killed a hard drive. Any ideas on how I can get the data off?"
- Next in thread: Allan Wind: "Re: how to exlude certain directory from grep search path"
- Reply: Allan Wind: "Re: how to exlude certain directory from grep search path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Aug 2005 17:25:05 -0400
Hi,
I am trying to find all files that contain a certain string using grep
recursively:
$> grep -v -r --exclude=dirN/* --include=*.php -e pdf
So I am searching for "pdf" string in all *.php files recursively in the
current directory. However, there is a directory that I want to exclude
from the search path:
./dirbase/dirN
I do not want grep to look in "dirN" at all. How do I do that? The
command above doesn't work to exlude everthing under "dirN".
thanks,
->HS
-- (Remove all underscores,if any, from my email address to get the correct one. Apologies for the inconvenience but this is to reduce spam.)
- Next message: chris.kernaghan_at_gmail.com: "Linux Media player laptop"
- Previous message: JDS: "Re: Ooops, I killed a hard drive. Any ideas on how I can get the data off?"
- Next in thread: Allan Wind: "Re: how to exlude certain directory from grep search path"
- Reply: Allan Wind: "Re: how to exlude certain directory from grep search path"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|