I have a file that I have downloaded using a perl script and the file is in .gz format. The command I am using to gunzip the file is
Sometimes this works and sometimes it does not. I don't know why. It was working great for awhile and then all of a sudden I started getting the error.
gunzip: file.log.gz: invalid compressed data--crc error
gunzip: gfile.log.gz: invalid compressed data--length error
What could be causing this problem? I even get this error when doing the command manually.
TIA
Mike V.
Code:
system("gunzip -f" . $localfile); # file name is $file.log.gz
substr($localfile, -3) = ""; #remove the ".gz" from $localfile name
Sometimes this works and sometimes it does not. I don't know why. It was working great for awhile and then all of a sudden I started getting the error.
gunzip: file.log.gz: invalid compressed data--crc error
gunzip: gfile.log.gz: invalid compressed data--length error
What could be causing this problem? I even get this error when doing the command manually.
TIA
Mike V.