From the manual cron(8):
When executing commands, any output is mailed to the owner of the crontab […].
So what your article suggests here is to produce no output, thus sending no mail.
Another way (more convenient?) to disable mail is to use the
-m off option, i.e.
crond -m off
Now to the syntax: this is specific to the Bourne shell language (and its derivatives such as
zsh, and so on).
will redirect to file descriptor
n (or standard output if unspecified) to file descriptor
A file descriptor can be a file name of the address of a stream.
& is the address operator as in the C language.
Conventionally, file descriptor
1 is standard output (a.k.a. stdout) and file descriptor
2 is standard error (a.k.a. stderr). The chunk
is redirecting stdout to /dev/null.
is redirecting the error stream to the output stream, which has been redirected to /dev/null. As such, no output is produced and no mail is sent.
Warning: the order of redirection matters:
is not the same as
Try these two commands with a non-privileged user:
ls >/dev/null 2>&1
ls 2>&1 >/dev/null
Indeed, in the later case, file descriptor
2 is set to the current address of file descriptor ``1 (which is stdout at this very moment), and then the file descriptor
1 is redirected to
/dev/null. File descriptor
2 is still redirected to stdout, no matter what happens to file descriptor