ouch
loosely stands for Obvious Unified Compression files Helper and aims to be an easy and intuitive way of compressing and decompressing files on the command-line.
To decompress any number of files, just supply them to ouch
.
Use the -o, --output
flag to redirect the output of decompressions to a folder.
```sh
a.zip
ouch a.zip
ouch a.zip b.tar.gz
ouch a.zip b.tar.gz c.tar.bz2 -o new_folder ```
The compress
subcommand is able to compress files and folders. The last argument will be the output file.
You can also use the c
alias for this subcommand.
The compression format employed will be defined according to the output file's extension.
```sh
archive.zip
ouch compress a b c d archive.zip
.tar.bz2
archiveouch compress a.mp4 b.jpg c.png files.tar.bz2
videos.tar.xz
ouch compress Videos/ funny_meme.mp4 videos.tar.xz
ouch c src/ target/ build.tar.lz ```
```
ouch list videos.tar.xz ```
| | .tar | .zip | .tar.*¹ | .zip.*² | .bz, .bz2 | .gz | .xz, .lz, .lzma | .7z | |:-------------:|:----:|:----:|:--------:|:--------:|:---------:| --- |:---------------:| --- | | Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | | Compression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
Note: .tar.*¹: .tar.gz, .tar.bz, .tar.bz2, .tar.xz, .tar.lz, .tar.lzma, .tar.zip
.zip.*²: .zip.gz, .zip.bz, .zip.bz2, .zip.xz, .zip.lz, .zip.lzma, .zip.zip
sh
curl -s https://raw.githubusercontent.com/vrmiguel/ouch/master/install.sh | sh
A recent Rust toolchain is needed to build ouch
. You can install it following the instructions at rustup.rs.
Once Cargo is installed, run:
```sh cargo install ouch
git clone https://github.com/vrmiguel/ouch cargo install --path ouch
git clone https://github.com/vrmiguel/ouch cd ouch && cargo run --release ```
ouch
runs on Linux, macOS and Windows 10. Binaries are available on our Releases page.
Binaries are also available at the end of each (successful) GitHub Actions run for these targets:
One must be logged into GitHub to access build artifacts.
ouch
does encoding and decoding in-memory, so decompressing very large files with it is not advisable.