On Sat, 23 Apr 2016 09:36:31 -0700 Galen Seitz <gal...@seitzassoc.com> dijo:
>On 04/23/16 09:22, John Jason Jordan wrote: >> 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 ~/? > >I don't know for certain, but presumably crontab does some >post-processing, perhaps checking for syntax errors, then moves the >file into the appropriate place. To confirm that's the case, just >look for your file using sudo in the /var/spool directory that Brian >mentioned. Something like: > >sudo ls -R /var/spool/cron/ OK, I figured out that the crontab file is where it's supposed to be. But now I have another problem. The command 0 3 * * * cp -auf /home/jjj/Mail /media/jjj/Data/Mail Worked the first time I ran it, but not subsequent times, i.e., it's like it finds the data folders are already there and won't overwrite them. I first realized this when I checked and the Mail folder had not been changed by the 3am cron job. So I tried running the above command (just the actual command) manually from the command line and, again, it did nothing. Then I deleted the backup Mail folder completely and ran the command again. This time it copied the ~/Mail folder to /media/Data/Mail. According to man cp -auf is what I should be using for what I want the command to so, but apparently there is something that I am not understanding. _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug