I have a requirement to ensure I do not overwrite a tape that is current. The way in which I propose doind this is by placing a header file at the beginning of the tape containing the creation date of the backup. Before each backup, I will read this file and validate.
My question is as follows. How can I read the first file from the tape or a certain amount of tape before exiting. My fear is that if I use the simple tar -xvf device headerfile it could take a while if there is nothing or a tape with content without a header file.