From owner-freebsd-questions@FreeBSD.ORG Thu Dec 24 16:38:46 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 E70441065697 for ; Thu, 24 Dec 2009 16:38:46 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id AC8598FC1E for ; Thu, 24 Dec 2009 16:38:46 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id nBOGch3g045520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Dec 2009 10:38:43 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id nBOGcghm062513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Dec 2009 10:38:43 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id nBOGcgJJ062508; Thu, 24 Dec 2009 10:38:42 -0600 (CST) (envelope-from dan) Date: Thu, 24 Dec 2009 10:38:41 -0600 From: Dan Nelson To: Rolf G Nielsen Message-ID: <20091224163841.GG98917@dan.emsphone.com> References: <4B32EBDB.1090808@lazlarlyricon.com> <4B32F1CA.8000500@lazlarlyricon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B32F1CA.8000500@lazlarlyricon.com> X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: clamav-milter 0.95.3 at email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Thu, 24 Dec 2009 10:38:43 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: Noel Jones , 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 16:38:47 -0000 In the last episode (Dec 24), Rolf G Nielsen said: > Noel Jones wrote: > > On Wed, Dec 23, 2009 at 10:19 PM, Rolf Nielsen wrote: > >> 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. > > > > Order matters. > > > > dd ... >/dev/null 2>&1 > > 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. > :) 2>/dev/null is really all you need, since dd only prints those info lines to stderr (stdout usually being used as its stream output unless of= is used) -- Dan Nelson dnelson@allantgroup.com