commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
as unixmonkey7109 pointed out, first awk parse replaces three steps.
There are 24 alternatives - vote for the best!
It's not a big line, and it *may not* work for everybody, I guess it depends on the detail of access_log configuration in your httpd.conf. I use it as a prerotate command for logrotate in httpd section so it executes before access_log rotation, everyday at midnight.
If you can do better, submit your command here.
You must be signed in to comment.