What are the options to make tar and/or gzip to act like pkzip.

Example: I want to be in a subdirectory and "zip" the contents and all other child subdirectories and save the relative path information.

Then I want to copy the archive file to another directory and unpack it with the paths expanding relative to the new directory.

Same as pkzip -rP  xxx.zip    pkunzip -d  xxx.zip


tar czvf ArchiveName.tar.gz DirName

tar xzvf ArchiveName.tar.gz

c = create
v = verbose
f = archive file name
x = extract
z = use compression

Watch out for including the name of the archive in the list of things to be archived.

tar czvf ../ArchiveName.tar.gz DirName

is probably better than

tar czvf ArchiveName.tar.gz DirName

 - Brian

You can find out more about tar with man tar

tar screen shot