[opensuse] Tar Read volume label only
Hi, Might be a simple one. I have a tape with no sticky label and I want to read the volume label which was set with --label="volumelabel" when the archive was written I could do tar -tvf /dev/st0 to get the table of contents which has the volume label at the top. e.g. V--------- 0/0 0 yyyy-mm-dd 00:00 volumelabel--Volume Header-- files list here But is there a way just to read ONLY the volume label with tar? Thanks Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
29.11.2017 04:15, Paul Groves пишет:
Hi,
Might be a simple one. I have a tape with no sticky label and I want to read the volume label which was set with --label="volumelabel" when the archive was written
I could do tar -tvf /dev/st0 to get the table of contents which has the volume label at the top.
e.g.
V--------- 0/0 0 yyyy-mm-dd 00:00 volumelabel--Volume Header-- files list here
But is there a way just to read ONLY the volume label with tar?
Not directly, but tar --test-label --verbose --file=/dev/st0 foo should print actual label and complain that it is different. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Paul -- ...and then Paul Groves said... % ... % I could do tar -tvf /dev/st0 to get the table of contents which has % the volume label at the top. ... % % But is there a way just to read ONLY the volume label with tar? Is the object to get fewer bytes? As long as it's the only file on the tape and you don't need to scan ahead to the next one (but that would probably be dev nrst0 anyway), how about dd to pull just the first block or two? HTH & Happy Holidays :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 29/11/17 10:21, David T-G wrote:
Paul --
...and then Paul Groves said... % ... % I could do tar -tvf /dev/st0 to get the table of contents which has % the volume label at the top. ... % % But is there a way just to read ONLY the volume label with tar?
Is the object to get fewer bytes? As long as it's the only file on the tape and you don't need to scan ahead to the next one (but that would probably be dev nrst0 anyway), how about dd to pull just the first block or two?
HTH & Happy Holidays
:-D
The object is to retrieve only the voulme label without having to get the entire table of contents from the tape. How exactly is the volume header stored on the tape in tar? is it just stored as the first file? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
David T-G
-
Paul Groves