On Fri, 22 Apr 2016 23:15:09 -0700
Paul Mullen <[email protected]> dijo:

>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
>    #  |   |   |   |   |   |

Using Russel's advice and yours above I created the crontab (using
nano) and added the following command:

        0 3 * * * cp -auf /home/jjj/Mail /media/jjj/Data/

The command executed, but this morning I decided to enhance it by
adding your handy reminder and a couple additional # lines copying and
pasting your explanation of '-auf' for future reference. When I went to
save my crontab to disk (Crtl-o in nano) I noticed from the prompt that
nano wanted to write the file as:

        /tmp/crontab.2Atvun/crontab

This puzzles me. I thought things in /tmp were only for temporary use.
Why is the file saved to /tmp? Shouldn't it be saved to someplace in ~/?
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to