[LBo] Re: Daily Mail backup [was: Moving Home] (Anita Lewis)
cdl at rc5.us
cdl at rc5.us
Tue Mar 13 14:45:51 CET 2007
Anita Lewis wrote:
> -------ajdailybu---------
> export FN=3D`date +%Y-%m-%d-%a-%Hh%M.tgz`
>
> time tar czvf /home/ajlewis2/tempbu/ajdaily$FN -T /home/ajlewis2/bin/
> dailytar &> /home/ajlewis2/Desktop/ajbackup-log.txt
Very nice. Your login shell is a csh variant, isn't it?
A tip for readers with a sh/bash/ksh login shell: the redirection
syntax will need to be adjusted to something like this:
time tar czvf ... > $HOME/Desktop/ajbackup-log.txt 2>&1
If you want to see the output as well as save it, something like this
ought to work:
time tar czvf ... 2>&1 | tee $HOME/Desktop/ajbackup-log.txt
When the above is run by cron, it'll send you email with the result.
cheers,
--
Collin Park
http://collinpark.blogspot.com
FAX: 1-360-351-0021
More information about the QnA
mailing list