Just as archives can store more than one file from the file system,
tapes can store more than one archive file. To keep track of where
archive files (or any other type of file stored on tape) begin and
end, tape archive devices write magnetic tape marks on the
archive media. Tape drives write one tape mark between files,
two at the end of all the file entries.
If you think of data as a series of records "rrrr"'s, and tape marks as
"*"'s, a tape might look like the following:
Tape devices read and write tapes using a read/write tape
head—a physical part of the device which can only access one
point on the tape at a time. When you use tar to read or
write archive data from a tape device, the device will begin reading
or writing from wherever on the tape the tape head happens to be,
regardless of which archive or what part of the archive the tape
head is on. Before writing an archive, you should make sure that no
data on the tape will be overwritten (unless it is no longer needed).
Before reading an archive, you should make sure the tape head is at
the beginning of the archive you want to read. You can do it manually
via mt utility (see mt). The restore script does
that automatically (see Scripted Restoration).
If you want to add new archive file entries to a tape, you should
advance the tape to the end of the existing file entries, backspace
over the last tape mark, and write the new archive file. If you were
to add two archives to the example above, the tape might look like the