Shell script in cron.daily ;Where does the log go ?
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.