Code: Select all
/usr/local/bin/rkhunter -c --cronjob 2>&1
Code: Select all
/usr/local/bin/rkhunter -c --cronjob 2>&1
Where does the output go? There's no terminal associated with cron, so it can't log there, and you've not redirected output to a file... Best way is to create a bash script to launch your job(s) and put that in /etc/cron.daily. Then have that script start with redirecting all output to a logfile, so you can see what's going on. More info + example here: http://forums.linuxmint.com/viewtopic.p ... =0#p481766lisapisa2 wrote:2>&1
Code: Select all
#!/bin/bash
#
exec >>/var/log/dailybackup.log 2>&1
#backup files (do I need sudo?)
/usr/bin/rsync -avz --exclude={/proc,/dev,/media,/mnt,/sys,/tmp,/home/xxxxx/images,/home/xxxxx/ctest,/home/xxxxx/Downloads,/home/xxxxx/"VirtualBox VMs"} // /media/xxxxx/Backup
exit
Code: Select all
#!/bin/bash
#
exec >>/var/log/dailybackup.log 2>&1
# announce starting
echo "$(date +'%b %d %X') $(uname -n) $(basename $0): starting daily backup"
#backup files (do I need sudo?)
/usr/bin/rsync -avz --exclude={/proc,/dev,/media,/mnt,/sys,/tmp,/home/xxxxx/images,/home/xxxxx/ctest,/home/xxxxx/Downloads,/home/xxxxx/"VirtualBox VMs"} // /media/xxxxx/Backup
Code: Select all
--exclude={/proc,/dev,/media,/mnt,/sys,/tmp,/home/xxxxx/images,/home/xxxxx/ctest,/home/xxxxx/Downloads} --exclude=/home/xxxxx/"VirtualBox VMs"
Code: Select all
/usr/bin/rsync -avzn
Code: Select all
/usr/bin/rsync -avz --dry-run
Code: Select all
/usr/bin/rsync -avz --exclude={/proc,/dev,/media,/mnt,/sys,/tmp,/home/xxxxx/images,/home/xxxxx/ctest,/home/xxxxx/Downloads,} --exclude=/home/xxxxx/"VirtualBox VMs" // /media/xxxxx/Backup
Code: Select all
exec >>/var/log/dailybackup.log 2>&
Code: Select all
exec >>/var/log/dailybackup.log 2>&1
That was my recommendation to add to the start of any scripts run from cron. It redirects stdout and stderr to a log file, so any output from the script or the commands it runs (or error messages from the shell) are written to a log file. I use this on all my Bash scripts run from cron, and it has helped me pin down some programming mistakes.Habitual wrote:What are you doing with?Code: Select all
exec >>/var/log/dailybackup.log 2>&1
That's all I need to know about 'that'.xenopeek wrote:That was my recommendation to add to the start of any scripts run from cron.Habitual wrote:What are you doing with?Code: Select all
exec >>/var/log/dailybackup.log 2>&1