Posted By

klovera on 08/13/11


Tagged

Shell Bash grep


Versions (?)

Speed up grep


 / Published in: Bash
 

URL: http://tdas.wordpress.com/2008/02/03/speed-up-grep/

First do:

locale

This will tell you your current 'locale' (which is likely UTF-8). Use the command below to change it to C. Searches are close to 50 times faster if you do this. See url for reference.

  1. export LC_ALL="C"

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: the_wanderer on May 31, 2012

If all else fails get an SSD hard drive to crunch the data. It worked for me, grepping 2 million files was considerably faster.

You need to login to post a comment.