Agriculture and Agri-Food Canada
Symbol of the Government of Canada

Unwrapping .Z and .tar.Z files

Introduction

1.1 What is a .Z file?
1.2 What is a .tar file?
1.3 What is a .tar.Z file?
1.4 Where can I learn more about .tar and .Z?

Instructions for UNIX

2.1 Unwrapping a .Z file
2.2 Unwrapping a .tar.Z file

Instructions for Windows

3.1 Unwrapping a .tar.Z file
3.2 Unwrapping a .Z file

Instructions for DOS

4.1 Unwrapping a .Z file
4.2 Unwrapping a .tar.Z file

Introduction

1.1 What is a .Z file?

.Z files are files that have been compressed with UNIX compression. Compressed files save disk space and minimize downloading time. Compressed files must be uncompressed before they can be used.

 NOTE: If you try to import a compressed file into ARC/INFO, you will get the following error:

     ERROR, next volume ****** does not exist.
     Bailing out of CONVEXPORT

1.2 What is a .tar file?

A .tar file is a tape archive file. A .tar file keeps related files together, and thus facilitates the transfer of multiple files between computers. The files in a .tar archive must be extracted before they can be used.

 

1.3 What is a .tar.Z file?

A .tar.Z file is a .tar file that has subsequently been compressed. These files must be both uncompressed and then untarred before they can be used.

1.4 Where can I learn more about .tar and .Z?

For more information about .tar and .Z files see the tar.Z FAQ or the MS-DOS FAQ

Instructions for UNIX

Tar and uncompress are part of most versions of UNIX.

2.1 Unwrapping a .Z file in UNIX

  1. Ensure that the file to be uncompressed has a .Z extension.
  2. Type:
    uncompress filename

    where filename is the name of the file to be uncompressed (e.g. uncompress pec001.e00.Z).

2.2 Unwrapping a .tar.Z file in UNIX

  1. Ensure that the file has a .tar.Z extension.
  2. Type:
    uncompress filename

    where filename is the name of the file to be uncompressed (e.g. uncompress pec001.tar.Z).
    • Type:
    • tar -xvf filename

      where filename is the name of the tar archived (e.g. tar -xvf pec001.tar).

Instructions for Windows

WinZip now handles .tar and .tar.Z files. (You can download winzip from www.winzip.com.)

 3.1 Unwrapping a .tar.Z file in Windows

  1. Ensure that the file has a .Z extension.
  2. Use winzip to uncompress the file.
  3. Winzip will ask you for the filename.  Make sure you change it from _tar. to .tar
  4. Use winzip to extract the archive.

3.2 Unwrapping a .Z file in Windows

  1. Ensure that the file to be uncompressed has a .Z extension.
  2. Use winzip to extract the file.
  3. Rename the resultant file if necessary (e.g. PEC001.E00)

Instructions for DOS

4.1 Unwrapping a .Z file in DOS

You will need gzip.exe. (You can download gzip from this site.)

 

  1. Ensure that the .Z file has a .Z extension (e.g. PEC001.Z). (NOTE: DOS may have truncated your .tar.Z file to appear as a .Z file. If so. follow the instructions in 4.2 for unwrapping a .tar.Z file.)
  2. Type:
    gzip -d filename

    where filename is the name of the export file.
    • Rename the file if required (e.g. PEC001.E00)

4.2 Unwrapping a .tar.Z file in DOS

You will need both gzip.exe and tar.exe. (You can download gzip and download tar from this site. Extract tar.exe from the tar320g.exe archive by typing tar320g.)
  1. Ensure that the .tar.Z file has a .Z extension (e.g. PEC001.Z).
  2. Type:
    gzip -d filename

    where filename is the name of the .tar.Z file.
    • Rename the resultant file so that it has a .tar extension (e.g. PEC001.TAR).
    • Type:
    • tar -xvf filename

      where filename is the name of the tar archive.

Source: Peter Schut
Contact: Head, CanSIS