Jump to content

The tar command explained


securitybreach

Recommended Posts

securitybreach

The Linux tar command is the swiss army of the Linux admin when it comes to archiving or distributing files. Gnu Tar archives can contain multiple files and directories, file permissions can be preserved and it supports multiple compression formats. The name tar stands for "TapeArchiver", the format is an official POSIX standard.

 

Tar file formats

 

A short introduction into tar compression levels.

  • No compressionUncompressed files have the file ending .tar.
  • Gzip Compression The Gzip format is the most widely used compression format for tar, it is fast for creating and extracting files. Files with gz compression have normally the file ending .tar.gz or .tgz. Here some examples on how to create and extract a tar.gz file.
  • Bzip2 Compression The Bzip2 format offers a better compression then the Gzip format. Creating files is slower, the file ending is usually .tar.bz2.
  • Lzip (LZMA) Compression The Lzip compression combines the speed of Gzip with a compression level that is similar to Bzip2 (or even better). Independently from these good attributes, this format is not widely used.
  • Lzop Compression This compress option is probably the fastest compression format for tar, it has a compression level similar to gzip and is not widely used.

The common formats are tar.gz and tar.bz2. If you goal is fast compression, then use gzip. When the archive file size is critical, then use tar.bz2.

 

What is the tar command used for?

 

Here a few common use cases of the tar command.

  • Backup of Servers and Desktops.
  • Document archiving.
  • Software Distribution.

..............

 

https://www.howtofor...ux-tar-command/


     

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...