Compress files faster using Pigz on

Опубликовано: 07 Декабрь 2023
на канале: The Lazy SysAdmin
655
36

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!!!


Смотрите видео Compress files faster using Pigz on онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The Lazy SysAdmin 07 Декабрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 655 раз и оно понравилось 36 людям.