GNU bug report logs - #7362
dd strangeness

Previous Next

Package: coreutils;

Reported by: Lucia Rotger <lucia <at> aircomp.aero>

Date: Wed, 10 Nov 2010 10:26:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 7362 <at> debbugs.gnu.org
Subject: bug#7362: dd strangeness
Date: Tue, 01 Mar 2011 09:45:42 -0800
On 03/01/2011 03:27 AM, Pádraig Brady wrote:

> So the standard way to accumulate short reads to a full write,
> is to specify separate ibs and obs (we'd probably want to prompt about
> setting obs too for efficiency)

Yes, good point, the diagnostic should suggest ibs=N obs=N
(instead of just ibs=N).

By the way, the relationship between fullblock and ibs=N obs=N is
a curious one, one that I don't fully understand.  If you have
ibs=N obs=N, why would you need fullblock?  This should probably
be documented (preferably by someone who understands it :-).

>>   * Rather than warn about potential problems, how about diagnosing the
>>     problems only when they actually occur?  That would help us avoid
>>     crying wolf.
>
> I like that idea, except that users might only hit an issue
> on particular runs, or when moving from a test file
> to a pipe in production.

True in both cases, but in practice these problems would
be pretty rare compared to the problem of dd crying wolf.
It's fairly common for people to use dd bs=N to extract sections
of regular files, e.g., "dd bs=1k count=1 seek=1 if=bigfile",
and issuing warnings in these cases (when dd operates perfectly
well) would cause unnecessary confusion.

> Checking POSIXLY_CORRECT allows one to disable the warnings

Yes, but POSIXLY_CORRECT should be used only to make a program conform
to POSIX when the default behavior does not conform.  It shouldn't
be used for auxiliary purposes such as suppressing warnings.  If we
want an option to suppress warnings, we should add one; but we
shouldn't overload POSIXLY_CORRECT.




This bug report was last modified 14 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.