sax
A simple but smart archiving and extraction tool.
Will automatically detect archive type and extract correctly, you no longer need to look up tar flags.
sax is developed for linux only, I have no interest into testing targets I don't personally use, but feel free to contribute.
sax can create and extract zip, tar, tar.gz, tgz, tar.xz, txz, tar.bz2, tbz2, tar.zst, tzst, and 7z archives. RAR archives can only be extracted.
Installation
From the AUR
Arch users can install the sax-git
package with an AUR helper such as yay:
From crates.io
Usage
Arguments are positional: input(s) come first and the output is always last. When the output is omitted, sax prompts for it.
Extracting archives
Extracts the contents of an archive into the output directory, creating it if needed.
Archiving files and directories
Creates an archive containing one or more input files or directories, creating all required subdirectories.
Configuration
sax stores configuration in ~/.config/sax/config.yaml by default, or
$XDG_CONFIG_HOME/sax/config.yaml when XDG_CONFIG_HOME is set.
extract_prefs.strip_top_level_dir: controls whether sax removes a single top-level directory from an archive before extracting into the output directory. Defaults totrue.
Optional flags
These flags override configuration settings for a single execution.
--stripremoves a single top-level directory.--no-stripkeeps a single top-level directory.