Re: Log date
- From: Mario Frechette <mario@xxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 15:13:42 -0400
Nils Kassube a écrit :
Mario Frechette wrote:thanks for the mail command tip i will use it
I am trying to get a date in my log file name for a script that runs
daily in cron and i can see in syslog
that the sript runs but no date on the log file
this is how it looks in crontab
43 12 * * 1-5 /bin sh rsync.sh >/home/eric/backup.log.`date
"+%d%m%y"`
should I put some commands in the script itself ?
It seems you can't use the "`" syntax because a crontab is not a script.
If you had installed the mail command, you would have received a mail
with the problem every time cron failed to execute your command.
Therefore, the log should be generated by your script. Another option
would be to install the mail command (e.g. package mailx). Then you would
receive the output of the script as a mail.
Nils
but what I would like is to create a log file with a date in the name
of the file that would look like ( backup.log.`date +%d%m%y`) format or
anything near that
I succeded to create a file named backup.log in the /home DIR
but how to do that in a bash script ?
Mario
--
Mario Fréchette
Technicité
988 des Grives
Victoriaville
G6T1E8
819-740-0554
mario@xxxxxxxxxxxxx
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: Log date
- From: Nils Kassube
- Re: Log date
- References:
- Log date
- From: Mario Frechette
- Re: Log date
- From: Nils Kassube
- Log date
- Prev by Date: Mail Notification SSL/TLS support
- Next by Date: Re: Managed to install Ubuntu but a question about Alsa
- Previous by thread: Re: Log date
- Next by thread: Re: Log date
- Index(es):
Relevant Pages
|