Posted By

klovera on 08/13/11


Shell Bash grep

Versions (?)

Speed up grep

 / Published in: Bash


First do:


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  


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.