x
Loading
 Loading
Hello, Guest | Login | Register

What’s GNU in Old Utilities, Part Six: tar

What’s new with tar since it was written eons ago? A lot. Here’s the sixth of a series about new features of old utilities.

This month — in the penultimate article of a series on new features added to utilities by GNU hackers and others– let’s look at changes to the somewhat-under-named “tape archiver,” or tar. This program handles a lot more than tapes: It packs files and their metadata (permissions, owner, links and more) into an archive format that can be compressed and transferred across a network, fed through a pipe to another tar running in a different directory, stored on a public server for people to download — and yes, written to a tape.
Let’s look at GNU tar version 1.13.93 from the Debian stable distribution.

Keys Versus Options

Some of the original Unix utilities didn’t accept options starting with a dash (). Instead, their first argument was one or more key characters, like options without the dashes. One of these utilities was dump and another was tar. Some keys had corresponding arguments — a filename or the blocking factor, for instance — and the arguments had to come in the same order as their keys.
For example, to add a tar file on the no-rewind tape device /dev/ nrst8 and use a blocking factor of 20, you’d use the add flag r, the file flag f, the blocking factor flag b, then the arguments for the f and b keys, and finally the filenames to add. You’d type:
$ tar rfb /dev/nrst8 20 dir1 dir2

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. KDE 4.4: Does It Work Yet?
  2. Writing Custom Nagios Plugins with Python
  3. Power Up Linux GUI Apps
  4. Tweeting from the Command Line with Twyt
  5. When Memory Serves You: Using ramfs and tmpfs
Follow Linux Magazine
Rackspace