heise + | Introduction to tar: Packing and unpacking data cleverly on the command line

Source: Heise.de added 21st Dec 2020

  • heise-+-|-introduction-to-tar:-packing-and-unpacking-data-cleverly-on-the-command-line

The Tape Archiver is the mother of all packers and standard on the command line. An introduction to the powerful and at the same time inconspicuous tool.

(Image: Michael Plura)

Introduction to tar: Packing and unpacking data cleverly on the command line First steps with tar Search archives Unpack archives Compress archives Deletion, backups and a packer alternative Software and extensive documents of any kind are usually available for download as a compressed package. A click in the web browser is all it takes to move the package to the download folder. Double-click in the file manager or right-click and “unzip here” to access its content. Even a packed zip archive can be created without much effort: Mark all the required files and directories, right-click again and “compress” in most cases already leads to the desired result.

However, these simple methods fail when it comes to special use cases or even packing in scripts – be it for automatic backups carried out regularly via cron or the provision of generated data on a web server. The classic Unix packer tar is available for this in the GNU / Linux or FreeBSD terminal. This has a big advantage: it is available for almost every operating system and it behaves almost identically everywhere. tar itself cannot compress, which sounds impractical at first, but has advantages because tar works with all common external packers. So tar is first and foremost a sophisticated tool for combining and packing files and directories. Via simple options like z or j tar then uses the compressor of choice such as gzip, bzip2, xz or almost any other data squeezer to evaporate either quickly and moderately or slowly and extremely.

This article shows the basic handling of tar and the common compressors in the terminal under the BSDs and GNU / Linux. macOS behaves like FreeBSD, OpenBSD, and NetBSD thanks to the FreeBSD userland. Under Windows 10 there are different implementations like bsdtar or gzip. We also present tricks and tips that simplify daily work with archives.

Access to all contents of heise + exclusive tests, advice & background information : independent, critically founded c’t, iX, Technology Review , Mac & i, Make, c’t Read photography directly in the browser register once – read on all devices – can be canceled monthly first Month free, then monthly 9, 95 € Weekly newsletter with personal reading recommendations from the editor-in-chief Start FREE month Start your FREE month now heise + already subscribed?

Sign in and read Register now and read the article immediately More information about heise + Introduction to tar: Packing and unpacking data cleverly on the command line First steps with tar Search archives Unpack archives Compress archives Deletion, backups and a packer alternative

Read the full article at Heise.de

brands: Basic  linux  other  
media: Heise.de  
keywords: Operating System  Review  Server  Software  Windows  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91