mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
Update README.md
This commit is contained in:
parent
bf8ef70d16
commit
ce9118a2dc
105
README.md
105
README.md
@ -2,23 +2,26 @@
|
||||
|
||||
<!--  -->
|
||||
|
||||
`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.
|
||||
`ouch` loosely stands for Obvious Unified Compression files Helper.
|
||||
|
||||
It is an easy and painless way of compressing and decompressing files in the terminal.
|
||||
|
||||
Works in `Linux`, `Mac OS` and `Windows`.
|
||||
|
||||
<!-- - [Listing files](#Listing-the-elements-of-an-archive) -->
|
||||
|
||||
- [Usage](#Usage)
|
||||
- [Decompressing files](#Decompressing-files)
|
||||
- [Compressing files/directories](#Compressing-files-and-directories)
|
||||
- [Listing files](#Listing-the-elements-of-an-archive)
|
||||
- [Supported Formats](#Supported-formats)
|
||||
- [Installation](#Installation)
|
||||
- [Supported Formats](#Supported-formats)
|
||||
- [Supported operating systems](#Supported-operating-systems)
|
||||
|
||||
## Usage
|
||||
|
||||
### Decompressing files
|
||||
### Decompressing
|
||||
|
||||
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.
|
||||
Run `ouch` and pass compressed files as arguments.
|
||||
|
||||
```sh
|
||||
# Decompress `a.zip`
|
||||
@ -26,45 +29,76 @@ ouch a.zip
|
||||
|
||||
# Decompress multiple files
|
||||
ouch a.zip b.tar.gz
|
||||
```
|
||||
|
||||
Use the `-o/--output` flag to redirect the output of decompressions to a folder.
|
||||
|
||||
```sh
|
||||
# Decompress multiple files but inside new_folder
|
||||
ouch a.zip b.tar.gz c.tar.bz2 -o new_folder
|
||||
```
|
||||
|
||||
### Compressing files and directories
|
||||
### Compressing
|
||||
|
||||
The `compress` subcommand is able to compress files and folders. The **last** argument will be the **output file**.
|
||||
Use the `compress` subcommand.
|
||||
|
||||
You can also use the `c` alias for this subcommand.
|
||||
|
||||
The compression format employed will be defined according to the output file's extension.
|
||||
Accepts files and folders, and the **last** argument shall be the **output file**.
|
||||
|
||||
```sh
|
||||
# Compress four files into `archive.zip`
|
||||
ouch compress a b c d archive.zip
|
||||
ouch compress 1 2 3 4 archive.zip
|
||||
```
|
||||
|
||||
The supplied **output file** shall have a supported compression format, [see the list](#Supported-formats).
|
||||
|
||||
You can also use the `c` alias for this subcommand.
|
||||
|
||||
```sh
|
||||
# Compress a folder and a file into `videos.tar.xz`
|
||||
ouch c Videos/ funny_meme.mp4 videos.tar.xz
|
||||
|
||||
# Compress three files into a `.tar.bz2` archive
|
||||
ouch compress a.mp4 b.jpg c.png files.tar.bz2
|
||||
|
||||
# Compress a folder and a file into `videos.tar.xz`
|
||||
ouch compress Videos/ funny_meme.mp4 videos.tar.xz
|
||||
ouch c a.mp4 b.jpg c.png files.tar.bz2
|
||||
|
||||
# Compress two folders into a lzma file
|
||||
ouch c src/ target/ build.tar.lz
|
||||
```
|
||||
|
||||
### Listing the elements of an archive
|
||||
<!-- ### Listing the elements of an archive
|
||||
|
||||
* **Upcoming feature**
|
||||
|
||||
```
|
||||
# Shows the files and folders contained in videos.tar.xz
|
||||
ouch list videos.tar.xz
|
||||
``` -->
|
||||
|
||||
## Installation
|
||||
|
||||
### Installing a binary
|
||||
|
||||
This script downloads the latest binary and copies it to `/usr/bin`.
|
||||
```sh
|
||||
curl -s https://raw.githubusercontent.com/vrmiguel/ouch/master/install.sh | sh
|
||||
```
|
||||
|
||||
### Compiling
|
||||
Install [Rust](rust-lang.org) and [Cargo](https://doc.rust-lang.org/cargo/) via [rustup.rs](https://rustup.rs/).
|
||||
|
||||
From latest official release:
|
||||
```sh
|
||||
cargo install ouch
|
||||
```
|
||||
|
||||
From repository source code:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/vrmiguel/ouch
|
||||
cargo build
|
||||
```
|
||||
|
||||
## Supported formats
|
||||
|
||||
|
||||
| | .tar | .zip | .tar.\*¹ | .zip.\*² | .bz, .bz2 | .gz | .xz, .lz, .lzma | .7z |
|
||||
|:-------------:|:----:|:----:|:--------:|:--------:|:---------:| --- |:---------------:| --- |
|
||||
| Decompression | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ |
|
||||
@ -75,32 +109,7 @@ Note: .tar.*¹: .tar.gz, .tar.bz, .tar.bz2, .tar.xz, .tar.lz, .tar.lzma, .tar.zi
|
||||
.zip.*²: .zip.gz, .zip.bz, .zip.bz2, .zip.xz, .zip.lz, .zip.lzma, .zip.zip
|
||||
```
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Getting a pre-compiled binary
|
||||
|
||||
```sh
|
||||
curl -s https://raw.githubusercontent.com/vrmiguel/ouch/master/install.sh | sh
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
A recent [Rust](rust-lang.org) toolchain is needed to build `ouch`. You can install it following the instructions at [rustup.rs](https://rustup.rs/).
|
||||
|
||||
Once [Cargo](https://doc.rust-lang.org/cargo/) is installed, run:
|
||||
|
||||
```sh
|
||||
cargo install ouch
|
||||
# or
|
||||
git clone https://github.com/vrmiguel/ouch
|
||||
cargo install --path ouch
|
||||
# or
|
||||
git clone https://github.com/vrmiguel/ouch
|
||||
cd ouch && cargo run --release
|
||||
```
|
||||
|
||||
## Supported operating systems
|
||||
<!-- ## Supported operating systems
|
||||
|
||||
`ouch` runs on Linux, macOS and Windows 10. Binaries are available on our [Releases](https://github.com/vrmiguel/ouch/releases) page.
|
||||
|
||||
@ -111,8 +120,4 @@ Binaries are also available at the end of each (successful) [GitHub Actions](htt
|
||||
* Windows 10
|
||||
* Linux ARMv7 dynamically linked (glibc)
|
||||
|
||||
One must be logged into GitHub to access build artifacts.
|
||||
|
||||
## Limitations
|
||||
|
||||
`ouch` does encoding and decoding in-memory, so decompressing very large files with it is not advisable.
|
||||
One must be logged into GitHub to access build artifacts. -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user