Categories: HowTo

How to Zip and Unzip Files In Linux

Hey, guys if you are looking for a method to zip and unzip files in Linux. Then check how quickly you can do this with few simple commands.  There are several methods for compressing and retrieving data in Linux operating system. I recommend you to use the “zip” function to compress your data files because of its ease of use and portability. Today all the major operating system supports the zip compression technique.

Now let’s check out the various unzip methods we can use in Linux operating system. The most unzip method depends on the extension of the compressed file. The most common extension of the compressed file is:- .zip, .tar, .gz, etc.

Zipping Files Using ZIP Compression

Zip (file formatZIP is a file compression format that supports lossless data compression. A ZIP file may contain one or more data files or directories that may have been compressed. The ZIP file format permits multiple compression algorithms, though DEFLATE Algorithm is most commonly used. The Linux zip program is compatible with all the major operating system. You can unzip the files compressed by Linux in any other operating system.

The command for Zipping Files in Linux

The syntax for Zipping the Files
zip [options] zipfile files_list

example for  Creating a zip file:
$zip myfile.zip filename.txt

Unzipping Zip Files

If you have an archive named File1.zip and want to get back the files, you would type:

Unzip the archive
Unzip File1.zip

List the data in the zip file
Unzip -l File1.zip

Unzip the archive in the specified path
unzip File1.zip -d /my/awesome/path

Unzipping Tar Files

To extract a file compressed with tar extension type the following in Linux command line:
tar xvf filename.tar

Unzipping Gunzip Files

To retrieve a file compressed with gunzip compression, type the following:
Gunzip filename_tar.gz

Then if you receive no errors, type:
tar xvf filename_tar

John

Recent Posts

How to Create Engaging Short Videos for Social Media

Social media has become a hub of videos in recent times. Whether it be short…

2 years ago

5 Ways To Download Videos On Pinterest With And Without Apps. Easy, Fast And Free!

It's easy to get lost in all of the concepts, ideas, and stories that are…

2 years ago

Battlegrounds Mobile India Official Website Link

The PUBG Mobile India is coming back after a year-long wait for PUBG lovers. PUBG…

3 years ago

Best Web Hosting Providers in 2021

If you are thinking of taking the best web hosting service for your website or…

3 years ago

Best Trending Products You Can Buy From Amazon in 2021

We dedicate this page to those who want to checkout some interesting stuff available on…

3 years ago

How to use Grammarly on Overleaf LaTeX Editor

Writing a professional document, one can least expect grammatical mistakes. Grammarly is the most advanced…

3 years ago