2e3ba7996b
Current code will create an archive in the current directory with: % archive ../test.tar.gz test.* or will complain that the following archive doesn't exist in the current directory (given it actually exists in the parent one): % unarchive ../test.tar.gz Fix that and allow archives in any directory. Other changes: * Use `<required_param>` instead of `[required_param]` in the usage text * Don't explictly check if archive exists in `unarchive`, but let the respective tool fail with its own message Closes #312 |
||
---|---|---|
.. | ||
functions | ||
init.zsh | ||
README.md |
archive
Provides archive
and unarchive
functions for easy archive manipulation.
This module will make use of pigz
and pbzip2
if available to make use of all available CPU cores.
Functions
archive
generates an archive based on file extension. Syntax isarchive myarchive.tar.gz /path/to/archive
unarchive
unarchives a file based on the extension. Syntax isunarchive myarchive.7z
Archive formats
Format | Requirements |
---|---|
.tar | tar |
.tar.gz, .tgz | tar or pigz |
.tar.bz, .tar.bz2, .tbz, .tbz2 | tar or pbzip2 |
.tar.xz, .txz | tar with xz support |
.tar.zma, .tlz | tar with lzma support |
.gz | gunzip or pigz |
.bz, .bz2 | bunzip2 or pbzip2 |
.xz | unxz |
.lzma | unzlma |
.Z | uncompress |
.zip | unzip |
.rar | unrar or rar |
.7z | 7za |