How to read tapes in TAR per frame format

TAR per frame means each TIFF file is written as a separate TAR file onto tape. This is a practice in the entertainment industry.

Now, the default tape device (/dev/st0 on Linux) rewinds after each command. Trying to read consecutive files, and rewinding between each read, adds a lot of time.

It’s possible to specify a no-rewind tape device which doesn’t rewind after each command. The device name is different on every Unix but on Linux it’s /dev/nst0. (the “n” stands for no-rewind. The “st” stands for SCSI tape.)

Here is a loop to read a file and then advance to the next This command will extract the entirety of the TAR per frame tape.

while true ; do tar xvf /dev/nst0 ; mt -f /dev/nst0 fsf 1; done