- Notifications
You must be signed in to change notification settings - Fork2
Provides functions for easy archive manipulation.
License
NotificationsYou must be signed in to change notification settings
zimfw/archive
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Providesarchive
,unarchive
andlsarchive
functions for easy archivemanipulation based on file extensions.
Don't remember the complete tar command to compress, uncompress or list thecontents of an archive? Usearchive myarchive.tar.gz /path/to/be/archived
to compress,unarchive myarchive.tar.gz
to uncompress orlsarchive myarchive.tar.gz
to list, for example, and the respective functionswill take care of the underlying command for you. They also work with the otherarchive extensions listed below.
Suffix aliases are also provided so files can be directly uncompressed.
This module will make use ofpbzip2
andpigz
if available to make use of all available CPU cores.
Name | Usage |
---|---|
archive compresses files into an archive. | archive <archive_name.ext> <file>... |
unarchive uncompresses from archives. | unarchive <archive_name.ext>... |
lsarchive lists the contents of archives. | lsarchive <archive_name.ext>... |
Extensions | Required commands |
---|---|
.7z, .001 | 7za |
.rar | unrar orrar |
.tar.bz, .tar.bz2, .tbz, .tbz2 | tar |
.tar.gz, .tgz | tar |
.tar.lzma, .tlz | tar with lzma support or withlzcat |
.tar.xz, .txz | tar with xz support or withxzcat |
.tar.zst, .tzst | tar withunzstd |
.tar | tar |
.zip | unzip |
.bz, .bz2 | pbunzip2 orbunzip2 |
.gz | unpigz orgunzip |
.lzma | unzlma |
.xz | unxz |
.zst | zstd |
.Z | uncompress |