1753905 Members
9846 Online
108810 Solutions
New Discussion юеВ

tar data to be view

 
SOLVED
Go to solution
HP UNIX Professionals
Frequent Advisor

tar data to be view

Hi Guys,
I have HP UX-10.0 box
I watn to add data to the tape by tar. Before adding data, i want to check any data already there in tape(mt -t dev/Om status is not work in hpux 10.0). So pls anybody tell me the command to veryfy the data in the tape.

Thanks
vinay
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: tar data to be view

tar -t will list the tar archive that already exists on the tape, if that's what you mean.


Pete

Pete
OldSchool
Honored Contributor
Solution

Re: tar data to be view

you can use "tar -tvf /dev/rmt/0m" which will list the existing contents of the first tar file on the tape (or error out if nothings there / not tar format).

there is a problem with this method though. Unless you already know how many tar files are on the tape, you're going to have to use a non-rewind device and repeat the command until it errors, as its always possible someone did something like:

tar -cvf /dev/rmt/0mn
tar -cvf /dev/rmt/0mn
tar -cvf /dev/rmt/0m

which would create 3 separate tar files on the tape.

I don't recommend trying to add information to an existing tape, as it *does not* get appended to the existing archive / replace and existing file. In addition, any little mistake when entering the command can trash the existing archive, making the tape unusable.

Tape is relatively cheap, I'd use a new one....and sleep better having done so.