Here are a few tips to improve the performance of grep on large files:
- Prefix your command with
LC_ALL=C, in order to use theClocale with its smaller ASCII charset, instead of UTF-8 - Use
grep -Fto search for a fixed string (if possible), rather than a regex - Remove the
-ioption, if you don't need it
LC_ALL=C grep -F searchString largeFile
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.