42 lines
1.4 KiB
Markdown
42 lines
1.4 KiB
Markdown
|
# packrat
|
||
|
|
||
|
Packrat is a centralization of programs' various command syntaxes for compressing and decompressing archives.
|
||
|
It's written in POSIX shell script (tested with dash) and the UI is very opinionated.
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
`prat {c,d,cf,df} [type]`
|
||
|
|
||
|
### {c,d,cf,df}
|
||
|
|
||
|
- c - compress
|
||
|
- d - decompress
|
||
|
- cf - compress folder
|
||
|
- df - decompress folder
|
||
|
|
||
|
Packrat takes input from standard input and spews output to standard output, except for folder operations,
|
||
|
where it instead compresses all files in the current directory to standard output and always decompresses all files from standard input to the current directory.
|
||
|
There is no way to change this.
|
||
|
|
||
|
### supported types & dependencies
|
||
|
|
||
|
type | compression | decompression | folder compression | folder decompression
|
||
|
:--- | :--- | :--- | :--- | :---
|
||
|
**gzip** | `gzip` | `gzip` | not supported | not supported
|
||
|
**lzip** | not supported | `7z` or `lzip` | not supported | not supported
|
||
|
**tar** | not supported | `tar` | not supported | `tar`
|
||
|
**xzip** | `xz` | `xz` | not supported | not supported
|
||
|
**zip** | not supported | not supported | not supported | `7z`
|
||
|
|
||
|
### example usage
|
||
|
|
||
|
```
|
||
|
$ pwd
|
||
|
/home/user/place_where_i_unzip_files/
|
||
|
$ prat d gzip <file.tar.lz.gz | prat d lzip | prat df tar
|
||
|
$ ls
|
||
|
file.tar.lz.gz
|
||
|
thing_that_was_also_in_the_archive.lol
|
||
|
thing_that_was_in_the_archive.ext
|
||
|
```
|