Re: Supressing dd output

2009-12-24 Thread Dan Nelson
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
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Supressing dd output

2009-12-23 Thread Rolf G Nielsen

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Supressing dd output

2009-12-23 Thread Noel Jones
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Supressing dd output

2009-12-23 Thread Rolf Nielsen

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"