Install
unzip
$ sudo apt install unzip -y
Achieve
tar
# [c]reate an archive and write it to a [f]ile:
$ tar cf target.tar file1 file2 file3
# [c]reate a g[z]ipped archive and write it to a [f]ile:
$ tar czf target.tar.gz file1 file2 file3
# [c]reate a g[z]ipped archive from a directory using relative paths:
$ tar czf target.tar.gz --directory=<path/to/directory> .
Unzip
.tar
# Lis[t] the contents of a tar [f]ile [v]erbosely:
$ tar tvf source.tar
.gz
$ gzip -d file.gz
tar.gz
$ tar -xf archive.tar.gz
# E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:
$ tar xvf source.tar[.gz|.bz2|.xz]
# E[x]tract a (compressed) archive [f]ile into the target directory:
$ tar xf source.tar[.gz|.bz2|.xz] --directory=directory
.zip
$ unzip latest.zip
Unzip a ZIP File to a Different Directory
$ unzip filename.zip -d </path/to/directory>
$ unzip v2sitedat_linux_amd64.zip
Archive: v2sitedat_linux_amd64.zip
skipping: geosite.dat need PK compat. v6.3 (can do v4.6)
skipping: LICENSE need PK compat. v6.3 (can do v4.6)
skipping: main.go need PK compat. v6.3 (can do v4.6)
skipping: README.md need PK compat. v6.3 (can do v4.6)
skipping: sites/cn need PK compat. v6.3 (can do v4.6)
skipping: sites/proxy need PK compat. v6.3 (can do v4.6)
skipping: sites/reject need PK compat. v6.3 (can do v4.6)
skipping: v2sitedat need PK compat. v6.3 (can do v4.6)
# how to solve
$ sudo apt-get install p7zip-full; 7z x v2sitedat_linux_amd64.zip
.tgz
$ tar zxvf fileNameHere.tgz
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
blockchain
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper