Home

Awesome

Make-archive plugin

This plugin defines mkarch function that can archive files and directories with the given compression format you pass to it.

Example 1

Archive 'build' directory and 'README.md' file using tar.gz compression:

mkarch tar.gz build README.md

Example 2

Archive using the gzip's slowest compression method but best compression ratio:

mkarch -b tar.gz build README.md

Example 3

Print size and time of archiving 'prj' for each available compression format without outputting any archives

mkarch -s -t ALL prj

Installation

Zinit

zinit light 0xRZ/mkarch

Without plugin manager

source /path/to/mkarch.plugin.zsh

Supported compression formats

Compression formatUsed programs
tartar
tar.bz2bzip2 (low priority) OR pbzip2 (mid priority) OR lbzip2 (high priority)
tar.gzgzip OR pigz (takes precedence)
tar.xzxz OR pixz (takes precedence)
tar.zstzstd
tar.lz4lz4
tar.lrzlrzip
tar.lzolzop
7z7z
rarrar
zipzip
ALLSpecial extension to create archive using each available compression format

Available compression formats determined automatically based on existing system binaries. Plugin also supports tab completion for selection of compression format.