On Sunday 06 June 2004 12:14 pm, Paul Eggert wrote: > Scott Weikart <[EMAIL PROTECTED]> writes: > > tar cfb - 2 $files | dd of=/dev/nst0 obs=128k conv=sync > > > > But GNU dd in coreutils-5.2.1 doesn't pad the final output block. > > conv=sync is supposed to pad input blocks (ibs=), not output blocks > (obs=).
The Solaris 9 man page for 'dd' shows it padding output blocks: Example 4: Using conv=sync to Write to Tape The following example uses conv=sync when writing to a tape: example% tar cvf - . | compress | dd obs=1024k of=/dev/rmt/0 conv=sync with an example almost identical to the problem I'm trying to solve. > You might try "dd ibs=128k obs=128k conv=sync". That technically works, but the results are not desirable. It reads a variable number of 2b block from tar, pads the input buffer to 128KB, then writes it out. So, the space-efficiency is partially lost; the output is about 30 times larger than the output with my patch (when I tar a directory with a hundred files adding up to a couple MB). Also, when you extract the tar from your example, you have to use --ignore-zeros, else you'll lose files. And you get the warning "tar: Skipping to next header" for each section of padding. -scott _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
