On Fri, Nov 14, 2008 at 05:03:30PM +0100, Laurent Fousse wrote: > Hello, > > * Aioanei Rares [Fri, Nov 14, 2008 at 05:49:35PM +0200]: > > Maybe the kernel is at fault? > > The particular argument `/dev/zero/' I supplied to grep in my example > is not necessary, if this is what you mean. I can reproduce it with > any big file. Since /dev/zero is infinite in size, it will eventually > lead to an allocation error.
grep is line-based, so I'm not really surprised it eats all the memory when it receives only zeroes. What other "big file" did you tested this on? Can you test if using "LC_ALL=C grep" instead helps or if "grep -F" works? If you are greping in a binary file, I would recommend using strings + grep instead. For chkrootkit, I guess checking for fixed string (at least when we can expect long greps) is sufficient and would fasten it a lot. Best Regards, -- Nekral -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]