I was looking for a way to "grep" logs within certain time range. The first one I found (and use all the time since then) is using awk:-
awk '/r...
For further actions, you may consider blocking this person and/or reporting abuse
What if there's no log with that specific time?
You can make the time less and less unique by eliminating the further-right time-fields. That said, once you start getting into the range where your granularity is hours, maybe you don't need to be cutting down your logs all that much, any way?
Good question. Obviously I made assumption on the time format, as that all logs I have. What kind of format do you have?
And after you find your way through
sed
, nothing is stopping you from adaptinged
as your daily text editor.This tutorial means that this is a brief introductory guide to SED that will help give beginners a solid foundation about concrete tasks.
letsfindcourse.com/tutorials/sed-t...