Petr Uzel wrote: > On Wed, Feb 18, 2009 at 08:55:35PM +0100, Jim Meyering wrote: >> Petr Uzel <[email protected]> wrote: >> ... >> >> +test_expect_success \ >> >> + 'save a copy of the original primary GPT table' \ >> >> + 'dd if=$dev of=before count=1 skip=1' >> > >> > isn't bs=512 missing here ^^^ ? >> >> It's fine to omit it, since bs=512 is the default. > > I can confirm that it defaults to 512 on my system. However, I can't > find any reference about default bs value in the dd documentation > (more precisely, it is referenced in BSD and HPUX manpages, but not in > linux).
Thank you for mentioning that. Here's a proposed patch. Feedback welcome. Any language lawyers around? ;-) >From 0c91ae335d45250ed9024ededd36aac40e071d7b Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Thu, 19 Feb 2009 12:35:58 +0100 Subject: [PATCH] doc: dd: document that the default block size is 512 bytes * src/dd.c (usage): Document the default block size. * doc/coreutils.texi (dd invocation): Document that the default block size (bs, ibs, obs) is 512 bytes. Reported by Petr Uzel. --- THANKS | 1 + doc/coreutils.texi | 2 ++ src/dd.c | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/THANKS b/THANKS index bedb01a..f2fcd01 100644 --- a/THANKS +++ b/THANKS @@ -446,6 +446,7 @@ Peter Moulder [email protected] Peter O'Gorman [email protected] Peter Samuelson [email protected] Peter Seebach [email protected] +Petr Uzel [email protected] Petter Reinholdtsen [email protected] Phelippe Neveu [email protected] Phil Richards [email protected] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 42234d3..8d496ad 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7605,6 +7605,7 @@ dd invocation @cindex input block size Set the input block size to @var{bytes}. This makes @command{dd} read @var{bytes} per block. +The default is 512 bytes. @item o...@var{bytes} @opindex obs @@ -7612,6 +7613,7 @@ dd invocation @cindex output block size Set the output block size to @var{bytes}. This makes @command{dd} write @var{bytes} per block. +The default is 512 bytes. @item b...@var{bytes} @opindex bs diff --git a/src/dd.c b/src/dd.c index 4604ced..6837b7b 100644 --- a/src/dd.c +++ b/src/dd.c @@ -463,16 +463,16 @@ Usage: %s [OPERAND]...\n\ fputs (_("\ Copy a file, converting and formatting according to the operands.\n\ \n\ - bs=BYTES read and write BYTES bytes at a time\n\ + bs=BYTES read and write BYTES bytes at a time (also see ibs=,obs=)\n\ cbs=BYTES convert BYTES bytes at a time\n\ conv=CONVS convert the file as per the comma separated symbol list\n\ count=BLOCKS copy only BLOCKS input blocks\n\ - ibs=BYTES read BYTES bytes at a time\n\ + ibs=BYTES read BYTES bytes at a time (default: 512)\n\ "), stdout); fputs (_("\ if=FILE read from FILE instead of stdin\n\ iflag=FLAGS read as per the comma separated symbol list\n\ - obs=BYTES write BYTES bytes at a time\n\ + obs=BYTES write BYTES bytes at a time (default: 512)\n\ of=FILE write to FILE instead of stdout\n\ oflag=FLAGS write as per the comma separated symbol list\n\ seek=BLOCKS skip BLOCKS obs-sized blocks at start of output\n\ -- 1.6.2.rc1.241.g7bf82 _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

