Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2003 16:26:16 -0500
From:      "Charles Howse" <chowse@charter.net>
To:        "'Max Clark'" <maxc-freebsd-questions@beast.clarksys.com>, <freebsd-questions@freebsd.org>
Subject:   RE: Redirect to /dev/null
Message-ID:  <000101c38f75$24190170$04fea8c0@moe>
In-Reply-To: <002701c38f70$383173e0$04fea8c0@moe>

next in thread | previous in thread | raw e-mail | index | archive | help
> > What is the proper way to redirect output to /dev/null? I've 
> > been using the following in my crontab but output is still 
> > ending up in my mailbox.
> > 
> > ... 2>&1 > /dev/null
> 
> The ampersand preceeds the greater-than symbol, and you 
> redirect STDOUT
> to /dev/null, and then redirect STDERR to STDOUT.
> 
>  ... > /dev/null 2&>1

Whooops!  Sorry...
It should be:
... > /dev/null 2>&1
The the greater-than symbol preceeds the ampersand .

I was too quick on the trigger!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000101c38f75$24190170$04fea8c0>