On Fri, Apr 22, 2016 at 10:21:09PM -0700, John Jason Jordan wrote:
> On the Claws-Mail listserve it has been suggested to me that I use Cron
> to back up my mail folders daily in the wee hours of the morning. The
> proposal was to use:
> 
>    15 3 * * * cp -auf /home/<user>/Mail <backup_directory>
> 
> I think the '15 3' means 3:15 am, and the cp command is clear, but
> 'auf' means nothing to me, and I have other questions.

Yes, that'll run the "cp ..." command every day at 0315.  The "-auf"
options run cp in a mode that more or less behaves like rsync, meaning
it updates the destination so that it mirrors the source.

> where in Cron do I place this command? I see that Cron is running as I
> write this, so so I just enter the above command (edited for locations,
> of course) at a command line? How does the command line know I am
> calling Cron? 

The 'crontab' command will open your very own, personal cron job table
in whichever text editor the $EDITOR environment variable points to.
Said table file is where you define the various cron jobs you wish to
have executed on your behalf, one per line.

The crontab syntax is fairly straightforward, if limited.  The first
five columns represent the available scheduling options: minute of
hour, hour of day, day of month, month, day of week; the remainder is
the command to be executed. `man 5 crontab` will tell you more.

I like to paste the following handy reminder into the top of my
crontab:

    #  +---- minute
    #  |   +----- hour
    #  |   |   +------ day of the month
    #  |   |   |   +------ month
    #  |   |   |   |   +---- day of the week
    #  |   |   |   |   |   +-- command to execute
    #  |   |   |   |   |   |


-- 
Paul
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to