How to tell gunzip to read the file when the output file is there

  • Thread starter Thread starter alajangi
  • Start date Start date
A

alajangi

Hi Experts,

I want to create a new file if find command get some output, when i ran the below command I am getting the following error

# gunzip -c `find /home/guna/web3/ -iname "clk*" -cmin -66` >> /home/guna/$(date +%Y%h%d%H).log
gzip: compressed data not read from a terminal. Use -f to force decompression.
For help, type: gzip -h

because the output from find command there is no file generated in 66min, how to tell gunzip to read the file when find command found any file. when I see the log the error is below, the above command I am running as a cronjob.

# tail -f /var/mail/root
gzip: stdin: unexpected end of file

Please help me to get rid from this.

Thanks,
Kishore.

Continue reading...
 
Back
Top