[Top][All Lists]

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

Re: Redirect to /dev/null

From: David
Subject: Re: Redirect to /dev/null
Date: Thu, 10 Sep 2020 15:37:48 +1000

On Thu, 10 Sep 2020 at 09:04, Chris Elvidge <> wrote:
> I've recently come across a crontab line:
> 0 */6 * * *     /usr/bin/modprobed-db store &> /dev/null
> I've also read that '&> /dev/null' is outdated and should be replaced
> with '>/dev/null 2>&1'
> True? And exactly why?

True because although bash accepts &> and >& as valid
redirection-operator syntax, that syntax is not recognised
by all other shells and will instead give unexpected results
if used in those shells. So if your cron is not using bash,
problems might occur.

The POSIX standard redirection operators are described here:

More information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]