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

bmm
  • 159
  • 1
  • 2

3 Answers3

9
# your-command | gzip > your.gz
adaptr
  • 16,576
  • 23
  • 34
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 -.

user9517
  • 115,471
  • 20
  • 215
  • 297
0

I did like to improve on above answer.

This should work.

you-command | zip somename.zip -@