[vox-tech] STDOUT and /dev/null
Kenneth Herron
kherron+lugod at fmailbox.com
Tue Feb 28 09:47:47 PST 2006
Richard S. Crawford wrote:
> */5 * * * * wget -q http://our.server.com/admin/cron.php > /dev/null 2>&1
>
> As I understand it, this should be directing any output from cron.php to
> /dev/null.
It only redirects standard output and standard error. It doesn't prevent
wget from creating new files. Wget's normal behavior is to create a file
to save the downloaded data. Redirecting standard output or standard
error won't change that.
Wget has a "-O" option to control the name of the file that the
downloaded data is written to. Either of these should do what you want:
wget -q -O - http://our.server.com/admin/cron.php > /dev/null 2>&1
wget -q -O /dev/null http://our.server.com/admin/cron.php > /dev/null 2>&1
More information about the vox-tech
mailing list