LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-03-2007, 03:40 PM   #1
jeepescu
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
Shell script in cron.daily ;Where does the log go ?


So I have this rsync script in cron.daily.
The script works, but I am wondering, where does my log go ?
I was not able to find it, is there a problem with the permissions ?
Is there a place where I can check cron logs ?

My script looks something like this:
rsync -hrvzt --delete --stats /home/bob /media/backup >rsync.log

Any ideas ?
I am just curious, I think if I provide a full path for rsync.log it will put it where I want, but if I don't, where will it end ?

Thanks in advance

Last edited by jeepescu; 12-03-2007 at 03:42 PM.
 
Old 12-03-2007, 04:02 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,511

Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by jeepescu View Post
So I have this rsync script in cron.daily.
The script works, but I am wondering, where does my log go ?
I was not able to find it, is there a problem with the permissions ?
Is there a place where I can check cron logs ?

My script looks something like this:
rsync -hrvzt --delete --stats /home/bob /media/backup >rsync.log

Any ideas ?
I am just curious, I think if I provide a full path for rsync.log it will put it where I want, but if I don't, where will it end ?

Thanks in advance
I am not sure but I think that it might be the HOME directory of the user who made the cron entry. I suggest that you use the find command to see if you can find any stray rsync.log commands:

find / -iname "*rsync.log*" | less

--------------------------
Steve Stites
 
Old 12-03-2007, 06:07 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by jeepescu View Post
I think if I provide a full path for rsync.log it will put it where I want, but if I don't, where will it end?
You should use a full path for your log. Put it in "/var/log" if you want to be "standard".

If you don't provide a full path, your "rsync.log" file will go in the working directory of the cron job. This is probably in "/etc/init.d", since that is where the script to start the cron daemon is. The only exception to this would be if cron changed directory after starting.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM
Problem With Script in cron.daily fizbang Linux - Newbie 10 03-21-2005 10:23 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 02:30 PM


All times are GMT -5. The time now is 02:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration