LinuxCommandLibrary

ouch

Compress files using the LZMA algorithm

TLDR

Decompress a specific file

$ ouch decompress [path/to/archive.tar.xz]
copy

Decompress a file to a specific location
$ ouch decompress [path/to/archive.tar.xz] --dir [path/to/directory]
copy

Decompress multiple files
$ ouch decompress [path/to/archive1.tar path/to/archive2.tar.gz ...]
copy

Compress files
$ ouch compress [path/to/file1 path/to/file2 ...] [path/to/archive.zip]
copy

SYNOPSIS

ouch <SUBCOMMAND> [OPTIONS] <ARCHIVE> [<FILES>...]
SUBCOMMANDS: compress, decompress, encrypt, decrypt

PARAMETERS

-i, --interactive
    Prompt before overwriting existing files

-q, --quiet
    Suppress non-essential output

--format <FORMAT>
    Specify archive format (e.g., zip, tar.gz, zst)

-p, --password <PASSWORD>
    Provide password for encryption/decryption (encrypt only)

--insecure
    Use insecure password prompt (for scripts)

--identity <IDENTITY>
    Identity file for age encryption/decryption

--recipient <RECIPIENT>
    Public key recipient for age encryption

-h, --help
    Print help information

-V, --version
    Print version information

DESCRIPTION

Ouch is a fast, user-friendly command-line tool written in Rust for handling archives. It supports compression, decompression, encryption, and decryption of files and directories. Unlike traditional tools like tar or zip, ouch automatically detects formats and provides a unified interface.

Key features include support for multiple compression formats (zip, tar.gz, tar.zst, 7z, tar.bz2, tar.xz, brotli), encryption with age or password-based methods, and minisign for signing. It handles large files efficiently, offers quiet and interactive modes, and integrates seamlessly for sharing secure archives.

Ideal for backups, secure file transfer, and simplifying workflows, ouch emphasizes security and speed without sacrificing simplicity.

CAVEATS

Requires external tools like age, minisign, or compressors (e.g., zstd, xz) for full functionality. Password encryption uses scrypt; not suitable for high-security needs without age.

INSTALLATION

Via cargo: cargo install ouch-cli. Or binaries from GitHub releases for Linux/macOS/Windows.

EXAMPLE USAGE

ouch compress archive.tar.gz file1.txt dir/
ouch encrypt -r recipient.pub archive.age dir/
ouch decrypt archive.age

HISTORY

Developed by ouch-org starting in 2021 as a modern alternative to fragmented archiving tools. Written in Rust for safety and performance; version 0.5+ added broad format support and age integration. Actively maintained on GitHub.

SEE ALSO

tar(1), gzip(1), zip(1), 7z(1), age(1), minisign(1)

Copied to clipboard