Centos – Not possible to extract tar.gz archive in Centos

archivecentostar

I have just uploaded tar.gz archive to my Centos server from my home Windows 7 computer. Before that, it was extracted from .zip archive.

When I try to extract it:

tar -xvf file.tar.gz
gunzip file.tar.gz

It always give me error:
"not in gzip format"

The archive is not corrupted, because it is possible to extract it in Windows with Winrar.

The archive is quite big, more than 100 MB.

I don't know, what's the problem. Could you help me please? Thanks.

Peter

Best Answer

Are you sure you transferred the file from Windows to Linux in BINARY mode (if using FTP)?

Otherwise:

If under linux system to extract files from the archive, use this:

tar -zxvf archive.tar.gz

This will both UNgzip and UNtar the files and directories.

Related Topic