concatenate compressed and uncompressed logs
<span style="font-size: x-large;"><a href="http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs">concatenate compressed and uncompressed logs
$ find /var/log/apache2 -name 'access.loggz' -exec <a class="zem_slink freebase/guid/9202a8c04000641f800000000001abd9" title="Gzip" rel="homepage" href="http://www.gzip.org/">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 <a class="zem_slink freebase/guid/9202a8c04000641f800000000000584b" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk or some other command for analysis.
Note: if your version of ’find’ supports it, use:
find /var/log/apache2 -name 'access.loggz' -exec zcat {} + -or -name 'access.log' -exec cat {} +
- <a href="http://www.commandlinefu.com/commands/view/5882/concatenate-compressed-and-uncompressed-logs">View this command to comment, vote or add to favourites
- <a href="http://feeds2.feedburner.com/commands/by/recursiverse">View all commands by <a href="http://feeds2.feedburner.com/commands/by/recursiverse">recursiverse
<a href="http://www.commandlinefu.com">
by David Winterbottom (<a href="http://codeinthehole.com">codeinthehole.com)
<a href="http://feedads.g.doubleclick.net/~a/mnZcA00-ZXLWCLqWniCVwaTXU4Y/0/da">
<a href="http://feedads.g.doubleclick.net/~a/mnZcA00-ZXLWCLqWniCVwaTXU4Y/1/da">
URL: <a href="http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs">http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://blog.amit-agarwal.co.in/2010/04/12/visualizing-system-performance-data/">Visualizing system performance data (amit-agarwal.co.in) <li class="zemanta-article-ul-li"><a href="http://www.phpied.com/uncompressed-data-in-base64-probably-not/">Uncompressed data in base64? Probably not (phpied.com) <li class="zemanta-article-ul-li"><a href="http://www.stevesouders.com/blog/2010/07/12/velocity-forcing-gzip-compression/">Velocity: Forcing Gzip Compression (stevesouders.com) <li class="zemanta-article-ul-li"><a href="http://feedblog.org/2008/10/12/google-bigtable-compression-zippy-and-bmdiff/">Compression algorithms used by Google (feedblog.org) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/zemified_c15.gif" alt="Enhanced by Zemanta" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">
Related Articles:
- 2010/06/16 List of commands you use most often
- 2010/06/14 Google Profiles Turn Into OpenIDs
- 2010/06/08 Determine what process is listening on a port on Solaris, without lsof
- 2010/05/26 10 Wordpress Traffic Builder Plugins That Work
- 2010/05/19 Awk Introduction Tutorial – 7 Awk Print Examples