concatenate compressed and uncompressed logs

concatenate compressed and uncompressed logs

concatenate compressed and uncompressed logs

$ find /var/log/apache2 -name \'access.log*gz\' -exec zcat {} ; -or -name \'access.log*\' -exec cat {} ; This command allows you to stream your log files, including gziped files, into one stream which can be piped to awk or some other command for analysis.

Note: if your version of \’find\’ supports it, use:

find /var/log/apache2 -name \'access.log*gz\' -exec zcat {} + -or -name \'access.log*\' -exec cat {} +

\"commandlinefu.com\"

by David Winterbottom (codeinthehole.com)

\"\"
\"\"

\"\"

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs

\"Enhanced

6 thoughts on “concatenate compressed and uncompressed logs”

  1. hey there I just wanted to comment your blog and say that I really enjoyed reading your blog post here. It was very informative and I also digg the way you write! Keep it up and I’ll be back to read more soon mate

This site uses Akismet to reduce spam. Learn how your comment data is processed.