Logeintrag confixx_counterscript.pl
Posted: 2003-09-02 21:09
wo muss ich das einstellen, dass das confixx counterscript nicht bei jedem ausführen einen logeintrag in die /var/log/messages schreibt???
danke
danke
Resources for System-Administrators
https://www.rootforum.org/forum/
Code: Select all
-
Code: Select all
> /dev/null Code: Select all
> /dev/null 2>&1Code: Select all
meriadoc:~# tail /var/log/syslog -n 1
Sep 4 16:36:01 meriadoc /USR/SBIN/CRON[12889]: (root) CMD (/root/testscript.sh > /dev/null 2>&1)
Code: Select all
meriadoc:~# cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
25 6 * * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6 * * 7 root test -e /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6 1 * * root test -e /usr/sbin/anacron || run-parts --report /etc/cron.monthly
#
*/1 * * * * root /root/testscript.sh > /dev/null 2>&1
Code: Select all
meriadoc:~# tail /var/log/syslog -n 1
Sep 4 16:36:01 meriadoc /USR/SBIN/CRON[12889]: (root) CMD (/root/testscript.sh > /dev/null 2>&1)
Die pipes regeln NICHT den syslog!If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a syslog message about this command.