Overclock.net banner

1 - 2 of 2 Posts

·
Premium Member
Joined
·
18,611 Posts
Discussion Starter · #1 ·
Not sure whether this goes in other software or Linux but...

I'm using Putty to GREP some log text files roughly 15gb to 25gb big. So, I want to grep a specific pattern, but exclude one whole word. Is this possible?

So, for example, I am looking for all entries containing the word "cheese", but want to exclude anything with the whole word "cheeseboard" in. I read somewhere to use -vw parameter, but... i'm not sure how to do this.

So, my very basic grep is:

Code:

Code:
zgrep "cheese" log1.2011-10-12.gz
Would this work (I ask prior to trying it because once it is running, it can take hours before anything is found)

Code:

Code:
zgrep -v "cheeseboard" log1.2011-10-12.gz | zgrep "cheese"
Halp!?
 
1 - 2 of 2 Posts
Top