Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this strange mails comming from cron:

Return-Path: <>
Received: by (Postfix, from userid 0)
    id 6F944264D0; Mon, 10 Jan 2011 10:35:01 +0000 (UTC)
From: (Cron Daemon)
Subject: Cron <root@domain> lynx -dump
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
Message-Id: <>
Date: Mon, 10 Jan 2011 10:35:01 +0000 (UTC)

/bin/sh: lynx: not found

I have this cron settings in crontab file:


*/5 * * * * lynx -dump

17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

Lynx is installed on my Ubuntu as well.

Ofc in place of is my domain, just replaced.

Thanks ;)

share|improve this question
up vote 9 down vote accepted

You should check to make sure the lynx binary is in one of the locations specified in the PATH variable, or use the full path to the binary in the cron line. To surpress the errors, you want to redirect STDERR and STDOUT to /dev/null, like so:

*/5 * * * * lynx -dump >/dev/null 2>&1

The first redirection sends STDOUT to /dev/null, and the second sends STDERR with STDOUT (that is, to /dev/null).

share|improve this answer
Thanks realpath to lynx did the job. ;) – Somebody Jan 12 '11 at 17:20

The real issue here is this:

/bin/sh: lynx: not found

This is saying that lynx isn't found, and so that line in your crontab isn't even being run. Suppressing the errors using the redirection suggestions from Scrivener or blueben, you've just hidden the fact that the command you want to actually run isn't being run.

In general, cron will send those emails for error messages. The best way to suppress the emails is to fix the errors, and only if you can't fix the errors (eg, the script is always noisy) should you start to redirect output to /dev/null.

share|improve this answer
You didn't help him fix lynx or answer his question. – blueben Jan 12 '11 at 18:33
Fair call. Other answers (scrivener, nicola) have suggested ways to fix that though. I was really pointing out that blindly suppressing error notifications is not a fix. – Daniel Lawson Jan 12 '11 at 21:36

Add MAILTO to the top of your crontab and set it to a null string:

share|improve this answer

You want:

*/5 * * * * lynx -dump >> /dev/null 2>&1

share|improve this answer
-1 for blindly suggesting the OP redirect to /dev/null when it's clear that his command isn't even being run. Fix errors first, then clean up output – Daniel Lawson Jan 12 '11 at 17:37
You're giving me -1 for answering his actual question? Vicious, man. – blueben Jan 12 '11 at 18:33

If you want the path to the lynx binary, the simplest command is which lynx.

That should give you something like /usr/bin/lynx

share|improve this answer

maybe the lynx binaries are not registered in $PATH.

try this in your shell:

# locate lynx

it'll return some strings. Choose the one leads to lynx binaries and then do

# export PATH=$PATH:{the firstly returned string path until last dir}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.