Tar (and other?) blocking question

Andrew Beattie andrew at riddle.UUCP
Wed Jan 11 19:59:22 AEST 1989


In article <752 at n8emr.UUCP> lwv at n8emr.UUCP (Larry W. Virden) writes:
>
>Is there a way that a program could look at a file produced by tar and
>determine what blocking factor was used?  

Sure ...

dd if=/dev/{put_your_tape_device_here} bs=20b count=1 |wc -c

ie: use blocks as big as you can (I never met a device driver that could
handle bigger than 20b), read one block, then see how many characters
were in it.

Divide the number by 512 to get the blocking factor

+---------------------------------+-----------------+
| Andrew Beattie                  | Sphinx Limited  |
| Internal Systems Engineer       | Foundation Park |
| mcvax!ukc!reading!riddle!andrew | Maidenhead      |
| andrew at sphinx.co.uk             | England         |
| +44 62882 2266                  | SL6 3UD         |
+---------------------------------+-----------------+



More information about the Comp.unix.questions mailing list