copytape - copytape intermediate data file format
copytape duplicates magtapes on single-tape systems by making an
intermediate copy of the tape in a disk file. This disk file has a special
format that preserves the block boundaries and tape marks of the original
physical tape.
Each block is preceded by a header identifying what sort of block
it is. In the case of data blocks, the length of the data is also given.
Each header is on a separate text line, followed by a newline character.
- CPTP:BLK nnnnnn
- data\n
A data block is identified by the keyword BLK. The
length of the block is given in a six-character numeric field. The field
is zero-padded on the left if less than six characters are needed. The
header is followed by a newline character. The original data follows.
The data may have any characters in it, since copytape uses a
read(2) to extract it. The data is followed by a newline, to make the
file easy to view with an editor.
- CPTP:MRK
- A tape mark was encountered in the original tape.
- CPTP:EOT
- When two consecutive tape marks are encountered, copytape treats
the second as a logical end-of-tape. On output, both MRK and EOT generate
a physical tape mark. copytape stops processing after copying an
EOT.
Some weird tapes may not use two consecutive tape marks as logical end-of-tape.