troubleshooting Question

Extract just the volume name from an LTO tar archive

Avatar of PongBuddy
PongBuddyFlag for Canada asked on
Unix OS
6 Comments1 Solution814 ViewsLast Modified:
I create tar archives with the "-V <volume name>" flag.  When I do a 'tar -t', the volume name is the first record, which is then followed by the listing of the rest of the files on the tape.

I want to list that first record (without necessarily knowing the record's name) and stop the listing there.  I've tried the '--occurrence 1' argument, but tar doesn't stop after retrieving the 1st record... it scans through the rest of the tape.

There's got to be a way to tell tar to extract the first record from an archive and stop, no?

Maybe something with:
--checkpoint=1 --checkpoint-action=??

CentOS 5.4

TIA
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros