Summary: How to calculate the size of a tar archive on tape

From: Gary Beckett <gbeckett_at_myra.com>
Date: Thu, 14 Dec 2000 10:43:44 -0800

Well once again this list has come through for me.
Thanks to all who replied to my message.
There was 3 different approaches from 11 different people. The dd
command was used in various formats.
The suggestions are as follows:

* tar -tvf <tapedevice> | awk '{s+=$3};END{print s}'

*tar -tvf <tapedevice> | awk '
   BEGIN {sum = 0}
   {sum = sum + $3}
   END {print sum}'

* dd if=<tapedevice> of=/dev/null bs=1k

* dd if=<tapedevice> of=/dev/null bs=10k

* tcopy <tapedevice> (Since I've never used the tcopy command before
this is interesting but as suggested by the originator probably won't
give exactly what I needed, I'll have to play with it to see the
output)


Gary Beckett
Myra Systems Corp.
gbeckett_at_myra.com


Received on Thu Dec 14 2000 - 18:44:46 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT