[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Password file with over 3000 users.

On Fri, Sep 21, 2007 at 05:55:50PM +1000, Andrew McGlashan wrote:
> Turbo Fredriksson wrote:
>> Quoting Michael Loftis <mloftis@modwest.com>:
>>>> I will have to look into controlling the cron spam.
>>> 2>&1 > /dev/null to end of command line.
>> Actually, it's the other way around:
>>> /dev/null 2>&1
>> You first have to redirect STDOUT, then tell STDERR to go to STDOUT...
> I've heard that before many times, but the reverse has never failed me.

depends on what you want.

if you want both stderr and stdout to go to /dev/null then ">/dev/null 2>&1"

if you want stdout to go to /dev/null and stderr to go to whereever stdout
used to go to, then "2>&1 >/dev/null"

in other words, the "2>&1" redirects stderr (file descriptor 2) to
whereever stdout (file descriptor 1) *currently* (at the instant of the
redirection) goes.

so, when redirecting both, the order of redirections is significant.


craig sanders <cas@taz.net.au>

Democracy is also a form of worship. It is the worship of Jackals by Jackasses.
		-- H. L. Mencken

Reply to: