Archives
The legendary extract command โ never look up tar flags again.
Functions & Aliases
extract
- Description: Automatically detect and extract any compressed archive format
- Usage:
extract <file> - Example:
extract archive.tar.gz
Supported formats:
| Extension | Tool Used |
|---|---|
.tar.gz / .tgz | tar xzf |
.tar.bz2 / .tbz2 | tar xjf |
.tar | tar xf |
.gz | gunzip |
.bz2 | bunzip2 |
.zip | unzip |
.rar | unrar e |
.7z | 7z x |
.Z | uncompress |
extract project.tar.gz
# Extracting... Done.
extract backup.zip
# Extracting... Done.
๐ก Note: You no longer need to remember whether it's
tar xzf,tar xjf, orunzipโextractfigures it out automatically!
mktar
- Description: Create a
.tar.gzarchive from a file or directory - Usage:
mktar <archive.tar.gz> <target> - Example:
mktar project.tar.gz ./project
mktar release.tar.gz ./dist
# Created release.tar.gz
mkzip
- Description: Create a
.ziparchive from a file or directory - Usage:
mkzip <archive.zip> <target> - Example:
mkzip docs.zip ./docs
-- Part of the Archives module of Aliaskit --