Mailinglist Archive: opensuse (3288 mails)

< Previous Next >
Re: [opensuse] search for word in huge txt file
  • From: Anders Johansson <ajh@xxxxxxxxxx>
  • Date: Mon, 24 Dec 2007 21:38:10 +0100
  • Message-id: <200712242138.10270.ajh@xxxxxxxxxx>
On Monday 24 December 2007 20:39:30 Greg Freemyer wrote:
On Dec 24, 2007 2:33 PM, Anders Johansson <ajh@xxxxxxxxxx> wrote:
On Monday 24 December 2007 20:17:45 Carlos E. R. wrote:
The Monday 2007-12-24 at 12:19 -0600, Afan Pasalic wrote:
Randall R Schulz wrote:
On Monday 24 December 2007 09:49, Afan Pasalic wrote:
I have 1.6 GB big text file and I have to find if there is a
specific word in the file.
Every time I try
$> grep -i "word" file.txt
I'll get message: "grep: memory exhausted".

I would report that as a bug - unless you really have too little memory

cat file.txt | grep -i "word"

According to the bug report, it doesn't (always?) help

cat file.txt | fold | grep -i "word"

Or if file.txt is really binary junk:

strings file.bin | fold | grep -i "word"

well, he said it was a text file, but "fold" is good to know. I hadn't seen
that one before. Thanks


Madness takes its toll
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups