first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

cat and gzip: piping cat output through gzip and redirecting to a *.gz file

Consider three files each containing one word:

1.txt
2.txt
3.txt

This cat command, cat *.txt, produces the following output:

One
Two
Three

where each word is the one word in the three text files, respectively. Now we need to store this concatenated output in a compressed gzip file:

 cat *.txt | gzip > out.txt.gz

This piping is redirected into a *.gz file that contains one file, out.txt. The assumption here today is that this procedure can be used for apache log files generated by, say, vlogger.

mod date: 2008-07-05T02:03:54.000Z