Linux File Compression Explained: bzip, gzip, & xz

Published: 03 January 2021
on channel: SecureRandom
788
27

Compression is a way of reducing the size of a file using different algorithms and mathematical calculations. Some of the benefits of using compression are conserving disk space and using less bandwidth for network communication.

In this video we go over how to use gzip, bzip2, and xz in Linux then describe some use cases for each.

Support the channel:
BTC - 3NzWDDH3n5PsBKqWJyAb7rvsGvJKxcAPFv

Follow me:
SecureRandom on YouTube -
   / @securerandom5420  

SecureRandom on LBRY / Odysee -
https://odysee.com/@SecureRandom:1

------------------------------------------------------------------

Commands used in this video:

Compressing files with gzip
$ gzip file.txt
$ gzip -k file.txt # use -k to not delete the original file
$ gzip -c file.txt # use to send the stream to stdout

$ gunzip file.txt.gz # can also use -d


Compressing files with bzip2
$ bzip2 file.txt
$ bzip2 -k file.txt # use -k to not delete the original file

$ bunzip2 file.bz


Compressing files with xz
$ xz file.txt
$ xz -k file.txt # use -k to not delete the original file

$ unxz file.zx
$ xz -d file.xz # this is recommended for scripts


On this page of the site you can watch the video online Linux File Compression Explained: bzip, gzip, & xz with a duration of hours minute second in good quality, which was uploaded by the user SecureRandom 03 January 2021, share the link with friends and acquaintances, this video has already been watched 788 times on youtube and it was liked by 27 viewers. Enjoy your viewing!