Is there an easy way to truncate a big log file? Or in other words: How to view only special contents of a log file. E.g.
- How can I extract the last 1000 lines from a log file?
- How can I extract only lines with a special string in it?
- How can I extract log files with a special date/time?
I only know
tail but this command is restricted to the last 10 lines and it is too fast. Searching in a 8 GB log file takes to much time ...