Re: creating a log file



In news:1170276379.504602.164760@xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
samuel.stroud@xxxxxxxxx <samuel.stroud@xxxxxxxxx> wrote:

I want to be able to create a logfile from the output when the script
runs nightly in the cron...

So script runs in cron at night
it tars up /dir/dir to /dir
i get an email saying its done
<here I want to create a logfile of everything that was tar'd into /
dir/dir>

How is this done? Is there a variable I need to insert into the
script?

Use the verbose option to tar (tar cvf ...) and cron will email you the log,
otherwise redirect the verbose output of the tar command to whatever logfile
you can write to.

.



Relevant Pages

  • a cron problem
    ... I have trouble with a cron job, ... I wrote a script and it works, if I start it, but if cron ... for db in `cat liste` ... tar -cf $tar * ...
    (comp.unix.tru64)
  • a cron problem
    ... I have trouble with a cron job, ... I wrote a script and it works, if I start it, but if cron ... for db in `cat liste` ... tar -cf $tar * ...
    (comp.unix.shell)
  • a cron problem
    ... I have trouble with a cron job, ... I wrote a script and it works, if I start it, but if cron ... for db in `cat liste` ... tar -cf $tar * ...
    (comp.unix.programmer)
  • tar or dump and restore commands on Compaq Tru64 UNIX or Unix - restore from tape?
    ... They have a script I assume that runs a backup tape every night of just one ... So no idea if they are using tar or dump. ... assuming their either are using a tar or dump command / script. ... a restore from a tar file assuming they are using tar. ...
    (comp.unix.admin)
  • tar: directory checksum error
    ... I have a shell script that unzips and untars nearly 25 files and makes ... the message "tar: directory checksum error" ... If I do untar each file individually it works fine. ... This is free software; see the source for copying conditions. ...
    (comp.unix.solaris)