The online log file is very large, 200M. If you use VI to view it, it will freeze. How to search the content?
typecho2017-06-14 10:52:22
You can use grep
to search, supports regular expressions
Or you can use head
tail
etc. to view the content of the head and tail
Or use sed
to view the content within the specified range. sed
also supports string ranges, such as sed -nre '/regex1/,/regex2/p' log
can print the log between the two matching regular expressions
In addition, awk
can display specified columns
If there is really no available tool, you can use perl
one-liner or script instead. Although this language is old, regular expressions are very powerful and worth learning