Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mksysb on tape device 1

Status
Not open for further replies.

olli2003

Technical User
Jan 31, 2003
93
DE
Hi guys,

I've some short questions:
How it's possible to see the contents of
a system backup on tape device?
I also have to know
the size of the data on the tape?
How can I manage? Is there any way to do?
Thanks in advance!

Best Regards
Oliver
 
Hi olli2003

try this command

listvgbackup |awk 'BEGIN{size=0} {size += $0; printf "%12d\t%s\n",$1,$2} END {printf "total size = %d",size}'

the list lokks like this

123456 ./path/to/the/your/file

Total size is computed and printed at the end of the list

regards
 
Sorry, sorry what a mistake
Please correct :
size += $0 with size += $1 to get the right size
 
Ok, I've done!
..but rellay it seems to be the right values with the first
variant.
Thanks and regards
Oliver
 
Hi Olli2003

The 2 field list (size filename) given by litvgbackup is piped to awk as fields $1 $2.
So the size of each file is $1. Then the total size must be th sum of all $1's values.

$0 in awk stands for the whole line in input.

It seems that when we sum all the $0, only the numeric filed $1 is considered. $2 being alphanumeric is dropped! that's why the result stays correct.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top