Tar:
tar -cvzf name.tgz dir_to_be_archived
tar -cvzf –remove-files name.tgz dir_to_be_archived
Actions (one is required):
-c create an archive
-t list an archive
-x extract files from an archive
Typically required:
-f archivename name of file archive
Optional:
-z use gzip compression
-j use bzip2 compression
-v be verbose
–xattrs store SELinux and ACL properties

Zip:
Supports pkzip-compatible archives
Example:
zip -r etc.zip /etc
unzip etc.zip

Leave a Reply

You must be logged in to post a comment.