Tar:
tar -cvzf name.tgz subdir
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.