Two of the most popular file compression formats on Linux are TAR and ZIP. You might have seen some file archives with the .tar.gz extension. Those are TAR archives. On the other end, zipped files are well known as they also exist on other operating systems such as Microsoft Windows.
TAR means Tape Archive. While it doesn’t need to be stored on a tape backup anymore, TAR is used to create an uncompressed file archive. In order to compress a TAR file, the gzip compression format is used.
To make a TAR archive from the command line, the syntax is:
tar cvzf [archive name].tar.gz [directory to archive]
So for example if you wanted to create a compressed archive from a folder named “documents”, you would type:
tar cvzf documents.tar.gz documents
To extract files from a “targzipped” archive, the syntax is:
tar xvzf [archive].tar.gz
So if you wanted to extract the content from an archive file named documents.tar.gz, you would type:
tar xvzf documents.tar.gz
Let’s look at the switches used here:
Compressing or extracting files in ZIP format is pretty easy. Here’s how to compress multiple files using the ZIP command:
zip [archive].zip file1 [file2 file3...]
So for example, if you wanted to create a zipped archive containing two documents, you would use:
zip documents.zip mytext.doc othertext.pdf
Unzipping a zipped archive is quite easy too:
unzip [archive].zip
There are some switches you can use with the zip command. Typing
man zip
will bring up the zip manual.
There some other compression formats and utility available. Here are a few:
They are just not as popular as the previous format. Have a look at their manpages to find out more.
| 1 | InMotion Hosting - $5.95 |
| 2 | WebHostingHub - $4.95 |
| 3 | iPage - $2.99 |
| 4 | JustHost - $3.45 |
| 5 | HostGator - $4.95 |
| 6 | FatCow - $3.67 |
| 7 | GreenGeeks - $4.95 |
| 8 | HostMonster - $5.95 |
| 9 | BlueHost - $6.95 |
| 10 | GoDaddy - $4.31 |
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment