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:
tells you the number of lines in said file, and then tail the last 100 lines ( or how many are messed up) then u take the total amount of lines and then subract the 100 or so lines u DONT WANT, then do a head -n $new_number and then redirect it to new file.db
Use this command to see logs update in real time
Use the aliased command 'nsl'
This command opens the latest, most current rotating apache access log for visual analysis and inspection. Run this command from the apache log directory. For error logs, replace access_log with error_log.
This is useful for keeping an eye on an error log while developing. The !^ pulls the first arg from the previous command (which needs to be run in a sub-shell for this shortcut to work).
This uses awk to grab the IP address from each request and then sorts and summarises the top 10.