From owner-freebsd-questions@FreeBSD.ORG Thu Dec 24 04:45:05 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F68E1065670 for ; Thu, 24 Dec 2009 04:45:05 +0000 (UTC) (envelope-from lazlar@lazlarlyricon.com) Received: from proxy3.bredband.net (proxy3.bredband.net [195.54.101.73]) by mx1.freebsd.org (Postfix) with ESMTP id DD0C88FC13 for ; Thu, 24 Dec 2009 04:45:04 +0000 (UTC) Received: from ipb1.telenor.se (195.54.127.164) by proxy3.bredband.net (7.3.140.3) id 4AD3E1BA01E74C2E for freebsd-questions@freebsd.org; Thu, 24 Dec 2009 05:45:03 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlBgABOBMktV44PPPGdsb2JhbACBSpc/gkMBAQEBHhkLuheEMwQ X-IronPort-AV: E=Sophos;i="4.47,447,1257116400"; d="scan'208";a="19622216" Received: from c-cf83e355.09-42-6e6b7010.cust.bredbandsbolaget.se (HELO lazlar.kicks-ass.net) ([85.227.131.207]) by ipb1.telenor.se with ESMTP; 24 Dec 2009 05:44:59 +0100 Message-ID: <4B32F1CA.8000500@lazlarlyricon.com> Date: Thu, 24 Dec 2009 05:44:58 +0100 From: Rolf G Nielsen User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Noel Jones References: <4B32EBDB.1090808@lazlarlyricon.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Supressing dd output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 04:45:05 -0000 Noel Jones wrote: > On Wed, Dec 23, 2009 at 10:19 PM, Rolf Nielsen > wrote: >> Hello everyone, >> >> I'm wondering if there's a way to supress the summary output from dd. I'm >> working on a backup script, that encrypts the backups, and after encrypting >> overwrites the unencrypted file several times using dd. I've tried to >> redirect the output with 2>&1 > /dev/null but it doesn't work. Since I run >> the script from the daily_local variable in periodic.conf, and the script >> backs up 11 filsystems (ZFS) to separate files, the mail from periodic daily >> gets ridiculously long, and most of it being dd summaries. >> >> I guess I could hack the source code of dd, but I'd prefer not to have to. >> Has anyone got any ideas? >> >> Thanks in advance and Merry Christmas to all of you, >> >> Rolf Nielsen > > > Order matters. > > dd ... >/dev/null 2>&1 > > > -- Noel Jones Thanks Noel. I've never considered using that order before. Probably because first time I saw that construct and had it explained to me, it was ordered the way I had it, and I very rarely have any use for it, so I haven't really noticed that my way was wrong; I usually only redirect stdout if anything at all. Anyway, now it works like a charm. Thanks. :) Rolf Nielsen