Language:

Search

Different File Archive Types of Linux

  • Share this:

In this article, we are learning and understand on different and popular file archive types of Linux with example.

.tar
TAR stands for Tape Archive. tar is the simple format in which files are combined into a larger file. Handled by the tar command at the command-line. Tar files are not automatically compressed. The chief benefit of tar files is that they record permission and ownership details, making them ideal for backup.

# tar -czf xyz.tar /home/ubuntu/sushan/              ## For Archive
# tar -xzf xyz.tar                                                         ## For Extract

 

.tar.gz
Tar archives that have been additionally compressed using the gzip software, usually at the point of creation. Sometimes the .tgz file extension is used instead of .tar.gz.
# tar -czf xyz.tar.gz /home/ubuntu/sushan/          ## For Archive
# tar -xzf xyz.tar.gz                                                     ## For Extract


 
.tar.bz2
Tar archives that have been additionally compressed using the bzip2 software, usually at the point of creation. Bzip2 compression leads to the smallest files of all, so is preferable. Sometimes the .tbz file extension is used instead of .tar.bz2.
# tar -cjf xyz.tar.bz2 /home/ubuntu/sushan/         ## For Archive
# tar -xjf xyz.tar.bz2                                                     ## For Extract

 
.zip
As with Windows, zip files are compressed archives. Zip files have not gained much traction in the Linux/Unix world because of legal concerns some years ago. This is no longer an issue, but other archive formats such as gzip and bzip2 are simply more established.
# zip -r xyz.zip /home/ubuntu/sushan/             ## For Archive
# unzip xyz.zip                                                          ## For Extract
Sushan Shrestha

Sushan Shrestha

Join me on a captivating journey as I unravel the complexities of maintaining digital infrastructures, troubleshooting labyrinthine networks, and safeguarding the virtual realms from the shadows. Together, we'll explore the challenges and where every click and command shapes the digital destiny.