Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tar and zip

Status
Not open for further replies.

Marcel1958

Technical User
Oct 11, 2001
38
NL
I have to deliver a file what is tarred and zipped. Now i do first the tar and than gzip. The file extension is .gz
but they want the extension .tgz
In Linux i found the for the tar command the parameter -z to compress and tar but in AIX i cannot found this.
How can i create the .tgz file in AIX or can i simply rename the .gz to .tgz?
 
tar to stdout
gzip to stdout
redirect the tgz output to whatever file with tgz extension.
tar -f- ./dir|gzip -c >tarfile.tgz

or you can rename the tarfile.tar.gz to tarfile.tgz

HTH,

p5wizard
 
You can create a compressed tar file under AIX, it you use not the standard tar-command but the tar command which is deliverd within the Linux Toolkit for AIX.

The second way is you rename your *.tar.gz in *tgz

Then you con uncompress it with gzip -d, this command will in one step uncompress and untar the archive

Greetings

mad

Advanced Interactive eXecutable
 
I usually do it this way:

tar -cf - ./target_file_or_dir/ | compress > target_file_or_dir.tar.Z
 
Here's another way to do it if you don't have room for the tar and you need to send more than one dir (as happened to me):

# mknod tar_pipe p
# compress -f < tar_pipe > backup.tar.Z &
# tar -cvpf tar_pipe backup/
...any more dirs that you might want to tar
then,

# rm tar_pipe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top