KandZ – Tuts

We like to help…!

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!

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock