Subject: Re: dd and pipe question
To: NetBSD -current users <>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 04/15/1996 10:27:12
[ On , April 14, 1996 at 02:00 (+0200), Christoph Badura wrote: ]
> Subject: Re: dd and pipe question
> Travis Hassloch writes:
> >gzip -dc foo.tar.gz | dd ibs=10240 obs=10240 conv=sync of=/dev/tape
> You do NOT want conv=sync. It pads every *input* record to ibs. So
> for every short read on the input, you get pad bytes added to make up
> for ibs.
> According to Chris Torek dd behaves as follows:
I presume Chris T. was referring to the 4bsd version of dd, and not any
other. His description does indeed seen to be confirmed by examination
of the code, and the manual page concurs.
There is at least one other implementation, presumably based on the
original AT&T version, that still requires the "conv=sync" in order to
ensure that the *last* block is padded to obs and written. So far as I
know this version does not ever pad any other blocks.
Of course with the 4bsd version of dd, at least as included in NetBSD,
there's a "conv=osync" to force padding of the final block.
So, what you really want, when dealing with any QIC tape [which has a
normal and proper device driver] is:
gzip -dc foo.tar.gz | dd of=/dev/tape ibs=10k obs=10k conv=osync
Greg A. Woods
+1 416 443-1734 VE3TCP robohack!woods
Planix, Inc. <email@example.com>; Secrets of the Weird <firstname.lastname@example.org>