Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
Do keep in mind that zip and gzip are two very different beasts. –  Michael Kjörling Mar 5 '12 at 13:23

2 Answers 2

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 -.

share|improve this answer
# your-command | gzip > your.gz
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.