5

I have a process that is producing a big amount of log to the standard output in a short period of time. Is there a way to zip the standard output of my process to a file.

I am searching for something like: ./process | zip output.log.zip

1
  • Do keep in mind that zip and gzip are two very different beasts.
    – user
    Mar 5, 2012 at 13:23

3 Answers 3

9
# your-command | gzip > your.gz
7

You can do this with zip too

your-command | zip -q output.log.zip -

The output from your-command will be stored in the zip with afilename of -.

0

I did like to improve on above answer.

This should work.

you-command | zip somename.zip -@

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .