Here's good reason why you should replace gzip with pigz utility.
pigz stand for Parallel Implementation of GZip.
This means it will use multiple cores and processors making it an excellent replacement for gzip command.
Pigz works the same as Gzip, but it distributes the work across multiple processors and cores while compressing or decompressing, considerably speeding up the process.
Pigz does not come pre-installed but can be installed through the default repository.
Install on Ubuntu
sudo apt-get -y install pigz
Install on Red Hat base
sudo dnf -y install pigz
Usage examples:
For compressing a single file in a zip format, use the following syntax.
pigz file.log
This command will compress the specified file and save it in the current working directory with .gz extension.
Pigz also supports compression levels from 1 to 9.
Level 1 offers the fastest but the least compression.
Level 6 is the default.
Level 9 offers the slowest but the best compression.
For example, this command will compress a file using the best compression algorithm.
pigz -9 file.log
The -p switch can be used to manually specify how many cores should be allocated to the process.
For example, this command will allocate 6 cores for the compression process.
pigz -p6 file.log
To uncompress files, all you need to do is use the -d flag:
pigz -d file.log.gz
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
GIVE SUPPORT - / lazysysad
BUY ME A COFFEE - https://www.buymeacoffee.com/lazysysad
PAYPAL - https://www.paypal.com/donate/?hosted...
Drop me your feedback and comments below.
That's all for now.
If this video helped you in any way, please like share and subscribe!
Thank you!!!
Watch video Compress files faster using Pigz on online without registration, duration hours minute second in high quality. This video was added by user The Lazy SysAdmin 07 December 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 655 once and liked it 36 people.