COMPRESSING WITH XZ & ZIP | NORMAL & MAX COMPRESSION.

HOW TO COMPRESS A DIRECTORY WITH MAX COMPRESSION.
$ tar -cf - Dir-name/ | xz -9 -c - > Dir-name.tar.xz
#use compression 1 to 9
# "-9e" is even better max compression

#to watch progress bar of the current compression job, open new terminal & run:
$ watch -n30 -x pkill -USR1 -n -x xz
#or "-n1" for every second.

#IF YOU DONT CARE ABOUT COMPRESSION LEVELS AND WANT FASTEST JOB RUN:
$ zip -r Dir-name.zip Dir-name/

#You Can Encrypt Data.Zip With A Password By Passing The -E Option:
$ zip -r -e Dir-name.zip Dir-name/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s