'grep' is very slow when using it in a UTF-8 mode, specially for a large text file. However, it is fast if using 'C' mode. Use the command 'locale' to check the variable of 'LC_ALL'. Then
export LC_ALL="C"
(from http://tdas.wordpress.com/2008/02/03/speed-up-grep)
I tested it. The "C" mode is faster 50 times than the regular mode!
Tuesday, September 16, 2008
Linux:shell:command: speed up 'grep'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment