0

I have a file called myfile.dat.gz that I need to decompress. I have been trying gzip -d myfile.dat.gz, but this results in the error gzip: myfile.dat.gz: invalid compressed data--format violated.

These are the steps that were taken to get my the file:

  1. Compress myfile.dat on a different server using gzip myfile.dat
  2. Use sftp to download compressed file to local
  3. Compressed file placed on shared drive
  4. I download file from shared drive and try to decompress on different server

The person who sent the file was able to successfully decompress the file using gzip -d myfile.dat.gz on the source server, so something seems to have screwed up the format either during sftp or when placed on the shared drive. I've confirmed file is in binary format on my side. Any ideas on what could have happened/how to resolve?

3
  • 1
    Compare the exact file size in bytes. Calculate checksums of the file on both systems and compare the checksums, e.g. shasum myfile.dat.gz or md5sum myfile.dat.gz)
    – Bodo
    Commented Apr 27, 2021 at 13:12
  • @Bodo thanks, that's what I had requested but waiting to hear back.
    – formicaman
    Commented Apr 27, 2021 at 13:16
  • Without knowing the exact commands or procedure you used to transfer the file and maybe details about your shared drive it is difficult to guess what can go wrong.
    – Bodo
    Commented Apr 27, 2021 at 16:29

0

You must log in to answer this question.

Browse other questions tagged .