Filter log file entries based on date range
yes, there are multiple ways to do this. Here is how I would go about this. For starters, no need to pipe the output of cat, just open the log file with awk. awk -vDate=`date -d’now-2 hours’ +[%d/%b/%Y:%H:%M:%S` ‘$4 > Date {print Date, $0}’ access_log assuming your log looks like mine (they’re configurable) than the … Read more