Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ The tar Manual: DRAFT - 6. Common Problems Using tar

Media Vault

Software Library

Restoration Projects

Artifacts Sought

The tar Manual: DRAFT - 6. Common Problems Using tar

Go to the first, previous, next, last section, table of contents.


6. Common Problems Using tar

Unless you use the -P option, GNU tar will not allow you to create an archive that contains absolute pathnames. (An absolute pathname is one that begins with a `/'.) If you try, tar will automatically remove the leading `/' from the file names it stores in the archive. It will also type a warning message telling you what it is doing.

When reading an archive that was created with a different tar program, GNU tar automatically extracts entries in the archive which have absolute pathnames as if the pathnames were not absolute. If the archive contained a file `/usr/bin/computoy', GNU tar would extract the file to `usr/bin/computoy' in the current directory. If you want to extract the files in an archive to the same absolute names that they had when the archive was created, you should do a `cd /' before extracting the files from the archive, or you should either use the `-P' option, or use the command `tar -C / ...'.

Some versions of UNIX, (Ultrix 3.1 is know to have this problem) can claim that a short write near the end of a tape succeeded, when it actually failed. This will result in the -M option not working correctly. The best workaround at the moment is to use a significantly larger blocksize than the default 20.

In order to update an archive, tar must be able to backspace the archive in order to re-read or re-write a block that was just read (or written). This is currently possible only on two kinds of files: normal disk files (or any other file that can be backspaced with lseek()), and industry-standard 9-track magnetic tape (or any other kind of tape that can be backspaced with ioctl(...,MTIOCTOP,...)).

This means that the `-r', `-u', `-A', and `-D' commands will not work on any other kind of file. Some media simply cannot be backspaced, which means these commands and options will never be able to work on them. These non-backspacing media include pipes and cartridge tape drives.

Some other media can be backspaced, and tar will work on them once tar is modified to do so.

Archives created with the `-M', `-V', and `-G' options may not be readable by other version of tar. In particular, restoring a file that was split over a volume boundary will require some careful work with dd, if it can be done at all. Other versions of tar may also create an empty file whose name is that of the volume header. Some versions of tar may create normal files instead of directories archived with the `-G' option.


Go to the first, previous, next, last section, table of contents.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026