Re: show only 30 minutes of log file
In practice, you use log rollover so you have only 24 hours or less of logging in any file. Otherwise, whatever the technique (awk, perl, whatever) you will end up doing a lot of file I/O just to look at the last lines. An application worth its salt will also let you format the time in the logs so that they can be processed (or read) more easily. It could just be a matter of setting the right locale somewhere before starting the thing that produces the log.
Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Bookmarks