Linux CLI 39 ๐ง tar and zip commands
a - tar command
tar command is a tool for creating and manipulating archive files
It can pack multiple files into a single file and even compress them
You can also list the files in the archive and of course to extract them
Common options: c โ create and archive from files and/or directories
x โ extract an archive t โ list the contents for an archive
v โ verbose mode showing details r โ updates or add files to an archive
W โ verifies the integrity of an archive z โ uses gzip compression
A โ concatenates multiple archive files into a single file
b - tar command examples
tar -cvf files.tar 1.txt 2.txt โ Creates an Archive
tar -tf files.tar โ Lists Contents of an Archive
tar -xvf files.tar โ Extract Files from an Archive
tar -cvfz files.tar.gz 1.txt 2.txt โ creates a compressed tarball with gzip
tar -xvfz files.tar.gz โ extracts a compressed tarball with gzip
tar -cvfj files.tar.bz2 1.txt 2.txt โ creates a compressed tarball with bzip2
tar -xvfj files.tar.bz2 โ extracts a compressed tarball with bzip2
c - zip command
zip command is used to compress and package files
It can pack multiple files and directories
The extension of the archive file is .zip
zip -r 1.zip 1/ โ creates a Zip archive (-r โ recursive)
zipinfo 1.zip โ list content of a Zip Archive
unzip -v 1.zip โ extract files from an archive (-v โ verbose)
zip -r -1 output.zip / โ creates the compression and setting the compression level(-1)
0-9 are the compression levels, default is 6
--encrypt โ adds a password to the archive
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!