Monday, June 10, 2013

How to create a tar.Z file? The .Z extension in Unix!

We are talking on how to create a tar.Z (nicknamed .taz) file in UNIX-based systems like Linux, because this particular file format could not be easily found, so I tried randomly and learned, leading to this share. This is a normally compressed tar file in Unix-based systems The name of the utility itself is compress[1] [2].

Suppose we have a tar file named
myTarFile.tar
For compressing this using the compress utility, issue a command as below:
compress myTarFile.tar
This will give you a compressed tar file named  myTarFile.tar.Z Uncompressing this with following command will give you back the myTarFile.tar
uncompress myTarFile.tar.Z
Single line commands:
To create a tar.Z file in unix, the command will be
tar -cvf myTarFileName.tar file1 ; compress myTarFileName.tar
To uncompress and extract a tar.Z file, the command will be
uncompress -c myTarFileName.tar.Z | tar xvf -

No comments:

Post a Comment

Liked or hated the post? Leave your words of wisdom! Thank you :)