From d24265f9659d21c8e89f1f21cf3b774c7c120afe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Aug 2006 21:16:28 +0000 Subject: [PATCH] Warn about oflag=append without conv=notrunc. --- ChangeLog | 3 +++ doc/ChangeLog | 5 +++++ doc/coreutils.texi | 3 +++ src/dd.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b61e020..f32f5ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-08-09 Paul Eggert + * src/dd.c (usage): Warn about oflag=append without conv=notrunc. + See Debian bug 373736. + * src/dircolors.hin: Add mlterm, rxvt-unicode; this fixes Debian bug 317503. diff --git a/doc/ChangeLog b/doc/ChangeLog index 3f0f26a..6cdf374 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-08-09 Paul Eggert + + * coreutils.texi (dd invocation): Warn about oflag=append without + conv=notrunc. See Debian bug 373736. + 2006-08-08 Paul Eggert * coreutils.texi (shuf invocation, Random sources): New sections. diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 5a49761..bf4d32f 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7302,6 +7302,9 @@ system. Write in append mode, so that even if some other process is writing to this file, every @command{dd} write will append to the current contents of the file. This flag makes sense only for output. +If you combine this flag with the @samp{of=@var{file}} operand, +you should also specify @samp{conv=notrunc} unless you want the +output file to be truncated before being appended to. @item direct @opindex direct diff --git a/src/dd.c b/src/dd.c index 276ed74..ff30eda 100644 --- a/src/dd.c +++ b/src/dd.c @@ -458,7 +458,7 @@ Each CONV symbol may be:\n\ \n\ Each FLAG symbol may be:\n\ \n\ - append append mode (makes sense only for output)\n\ + append append mode (makes sense only for output; conv=notrunc suggested)\n\ "), stdout); if (O_DIRECT) fputs (_(" direct use direct I/O for data\n"), stdout); -- 2.7.4