I have a 400MB+ Tomcat log file (
catalina.out). How can I pull out entries for a given time period?
Not sure if this would work well for your 400MB file, but here are some CLI one liners that would do the trick.
If you're looking for entries for a specific date,
grep -c can probably do what you need.
Otherwise, you could probably use
sed -n '/date1/,/date2/p' filename
For example with an input file "test":
Day 0: foo Day 1: hello Day 2: world Day 3: blah
You could run
[me@mybox tmp]$ sed -n '/Day 1/,/Day 2/p' test Day 1: hello Day 2: world