[plug] Erasing a file from the end of a tape
Steve Baker
steve at iinet.net.au
Tue Oct 19 17:22:46 WST 2004
Ryan wrote:
> The intended result is that when I read the tape back to list its
> contents (involving lots of runs of tar), I want it to hit what is
> currently the EOF marker for the second last file and then on the next
> listing request report end of data or i/o error - as would normally
> occur if that EOF was the last thing ever written to tape. So I just
> want to nullify the final file from the tape.
I checked http://www.die.net/doc/linux/man/man1/mt.1.html, but I also
found http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?mt+1 which mentions
that mt erase will erase from current position to eot, rather than the
entire tape. This might be for other platforms than linux though.
If erase is not supported properly by either Linux or your tape drive or
doesn't do what you want perhaps you can write an EOF (mt weof) at the
right spot so you get an empty file when reading after incomplete_file-1.
Steve
More information about the plug
mailing list