Removing obsolete error variants
[ouch.git] / README.md
blob1d706cc9e7294f04da89abfc0713f2608c47f28e
1 # Ouch!
3 [![crates.io](https://img.shields.io/crates/v/ouch.svg?style=for-the-badge&logo=rust)](https://crates.io/crates/ouch) [![license](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge&logo=Open-Source-Initiative&logoColor=ffffff)](https://github.com/ouch-org/ouch/blob/main/LICENSE)
5 `ouch` stands for **Obvious Unified Compression Helper**, it's a CLI tool to compress and decompress files.
7 - [Features](#features)
8 - [Usage](#usage)
9 - [Installation](#installation)
10 - [Supported Formats](#supported-formats)
11 - [Contributing](#contributing)
13 ## Features
15 1. Easy to use.
16 2. Automatic format detection.
17 3. Same syntax, various formats.
18 4. Encoding and decoding streams, it's fast. <!-- We should post benchmarks in our wiki and link them here -->
19 5. No runtime dependencies (for _Linux x86_64_).
21 ## Usage
23 ### Decompressing
25 Use the `decompress` subcommand and pass the files.
27 ```sh
28 # Decompress one
29 ouch decompress a.zip
31 # Decompress multiple
32 ouch decompress a.zip b.tar.gz c.tar
34 # Short alternative
35 ouch d a.zip
36 ```
38 You can redirect the decompression results to another folder with the `-d/--dir` flag.
40 ```sh
41 # Decompress 'summer_vacation.zip' inside of new folder 'pictures'
42 ouch decompress summer_vacation.zip -d pictures
43 ```
45 ### Compressing
47 Use the `compress` subcommand, pass the files and the **output file** at the end.
49 ```sh
50 # Compress four files/folders
51 ouch compress 1 2 3 4 archive.zip
53 # Short alternative
54 ouch c file.txt file.zip
56 # Compress everything in the current folder again and again
57 ouch compress * everything.tar.gz.xz.bz.zst.gz.gz.gz.gz.gz
58 ```
60 `ouch` checks for the extensions of the **output file** to decide which formats should be used.
62 ## Installation
64 [![Packaging status](https://repology.org/badge/vertical-allrepos/ouch.svg)](https://repology.org/project/ouch/versions)
66 ### Downloading the latest binary
68 Compiled for `x86_64` on _Linux_, _Mac OS_ and _Windows_, run with `curl` or `wget`.
70 | Method    | Command                                                                            |
71 |:---------:|:-----------------------------------------------------------------------------------|
72 | **curl**  | `curl -s https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh \| sh`   |
73 | **wget**  | `wget https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh -O - \| sh` |
76 The script will download the [latest binary](https://github.com/ouch-org/ouch/releases) and copy it to `/usr/bin`.
78 ### Installing from source code
80 For compiling, check the [wiki guide](https://github.com/ouch-org/ouch/wiki/Compiling-and-installing-from-source-code).
82 ## Supported formats
84 | Format        | .tar | .zip | .bz, .bz2 | .gz | .xz, .lz, .lzma | .zst |
85 |:-------------:|:----:|:----:|:---------:| --- |:---------------:| --- |
86 | Supported | ✓   | ✓   | ✓         | ✓  |   ✓            | ✓  |
88 And the aliases: `tgz`, `tbz`, `tbz2`, `txz`, `tlz`, `tlzma`, `tzst`.
90 Formats can be chained (`ouch` keeps it _fast_):
92 - `.gz.xz.bz.zst`
93 - `.tar.gz.xz.bz.zst`
94 - `.tar.gz.gz.gz.gz.xz.xz.xz.xz.bz.bz.bz.bz.zst.zst.zst.zst`
96 ## Contributing
98 `ouch` is 100% made out of voluntary work, any small contribution is welcome!
100 - Open an issue.
101 - Open a pull request.
102 - Share it to a friend!