Untar in linux mint11/4/2022 ![]() ![]() The above command will compress Pictures folder and saves it as file.Īs one of our reader Wazz said in the comment section below, we can also use the ‘use-compress-program’ parameter within tar to run pigz instead of piping it out.Įxample: $ tar -use-compress-program=pigz -cf folder1 folder2 Limit number of processors while compressing However, we can achieve this by combining tar command with pigz like below. Pigz doesn't have any option to directly compress folders. Untar in linux mint zip#Similarly, to compress the file in zip format, use -K (upper case) flag: $ pigz -k -K archlinux.iso Compress Directories ![]() Here, we used the -k (lower case) to keep the original file after compressing it. The following command compresses the given file to zlib (.zz) instead of gzip format: $ pigz -k -z archlinux.iso You can, however, change it to different format. No compression: $ pigz -0 archlinux.iso Change compression formatīy default, it saves the output file in gzip format. Pigz supports the following compression methods:įor example, to compress a file using the best compression method (slow), run: $ pigz -9 archlinux.isoĬompress a file with less compression (fast): $ pigz -1 archlinux.iso $ pigz -l Īs you can see in the above output, the input file has been reduced by 3.3% from its original size. To list the contents of the above archived file, without extracting it, use -l flag. Untar in linux mint archive#$ pigz -k archlinux.iso List the contents of an archive file If you don't want to delete the original file, use -k (keep) to instruct Pigz not to delete the original file after processing it. Please note that the above command will delete the original file i.e. archlinux.iso and save it as in the current working directory. The above command will compress the given file i.e. To compress a file with default options, simply run: pigz For the purpose of this guide, I will be using archlinux.iso file (size 677.4 MB) for testing. By default, it compresses the file gzip (.gz) format. The compressed data format generated is in the gzip, zlib, or single-entry zip format using the deflate compression method. Pigz divides the given input into 128 KB chunks and compresses each one of them in parallel. Compress And Decompress Files In Parallel Using Pigz Log out and log back in to start using pigz. Untar in linux mint install#This command will extract the contents in a folder named pigz-2.4 in the current working directory.ĬD into "pigz-2.4" directory: $ cd pigz-2.4Ĭompile and install it using the following command: $ makeĬopy the pigz binary to your $PATH, for example /usr/local/bin: $ sudo cp pigz /usr/local/bin/ Then download the latest Pigz version from the official website (Link is given at the end): $ wget Įxtract the pigz tar file: $ tar -xzvf pigz-2.4.tar.gz On RPM-based systems: $ sudo yum install make gcc zlib-devel On other Linux distributions, compile and install from source as shown below.įirst, make sure you have installed the following prerequisites:įor example, on Debian-based systems you can install the above packages using command: $ sudo apt install make gcc zlib-devel On Ubuntu, Linux Mint: $ sudo add-apt-repository universe $ sudo apt install pigz On Arch Linux and its variants like Manjaro Linux, enable repository and install Pigz using command: $ sudo pacman -S pigz ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |