Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zimfw/archive
Provides functions for easy archive manipulation.
https://github.com/zimfw/archive
archive unarchive zim zimfw zsh zsh-plugin zsh-plugins
Last synced: 3 months ago
JSON representation
Provides functions for easy archive manipulation.
- Host: GitHub
- URL: https://github.com/zimfw/archive
- Owner: zimfw
- License: mit
- Created: 2017-12-04T18:46:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T00:05:09.000Z (about 1 year ago)
- Last Synced: 2024-07-11T12:59:58.243Z (4 months ago)
- Topics: archive, unarchive, zim, zimfw, zsh, zsh-plugin, zsh-plugins
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
archive
=======Provides `archive`, `unarchive` and `lsarchive` functions for easy archive
manipulation based on file extensions.[Don't remember the complete tar command to compress, uncompress or list the
contents of an archive?](https://xkcd.com/1168/) Use `archive myarchive.tar.gz
/path/to/be/archived` to compress, `unarchive myarchive.tar.gz` to uncompress or
`lsarchive myarchive.tar.gz` to list, for example, and the respective functions
will take care of the underlying command for you. They also work with the other
archive extensions listed below.Suffix aliases are also provided so files can be directly uncompressed.
This module will make use of `pbzip2` and `pigz` if available to make use of all available CPU cores.
Functions
---------| Name | Usage
| ---- | -----
| `archive` compresses files into an archive. | `archive ...`
| `unarchive` uncompresses from archives. | `unarchive ...`
| `lsarchive` lists the contents of archives. | `lsarchive ...`Archive extensions
------------------| Extensions | Required commands
| ---------- | -----------------
| .7z, .001 | `7za`
| .rar | `unrar` or `rar`
| .tar.bz, .tar.bz2, .tbz, .tbz2 | `tar`
| .tar.gz, .tgz | `tar`
| .tar.lzma, .tlz | `tar` with lzma support or with `lzcat`
| .tar.xz, .txz | `tar` with xz support or with `xzcat`
| .tar.zst, .tzst | `tar` with `unzstd`
| .tar | `tar`
| .zip | `unzip`
| .bz, .bz2 | `pbunzip2` or `bunzip2`
| .gz | `unpigz` or `gunzip`
| .lzma | `unzlma`
| .xz | `unxz`
| .zst | `zstd`
| .Z | `uncompress`