The Basics of Using Command Line Compression Utilities (gzip, bzip2, xz and 7zip)

In this video I go over the basics of using command line compression utilities like gzip, bzip2, xz and 7zip. I use these on a Mac but they are also standand on most Linux distributions.

Installing Macports: https://youtu.be/N22Ic6ZRPXI

List Files
ls -lh
View Gzip Help
gzip -h
Compress tar Archive with Gzip
gzip -9 data.tar
Uncompress tar Archive with Gzip
gzip -d data.tar
Compress tar Archive with Gzip (keep original file)
gzip -9c data.tar > data.tar.gz
Compress tar Archive using 7zip
7z a data.tar.7z data.tar

The Basics of using the Command Line tar Utility

In this video I go over the basics of using the tar (tape archive) utility on a Mac. This utility is also standard on most Linux distributions.

List Files in Directory
ls -lh
List Files Recursively
ls -R
Create tar Archive
tar -cvf data.tar data
Create tar Archive and gzip
tar -cvzf data.tar.gz data
Create tar Archive and bzip
tar -cvjf data.tar.bz2 data
Extract from tar Archive
tar -xvf data.tar