Import – Export crontab

One way is to work on the crontab file in another existing directory (e.g. /home/myuser/crontabs).
For example (for root crontab).
cd /home/myuser/crontabs
cp /usr/spool/cron/crontabs/root root
cp /usr/spool/cron/crontabs/root root.270309
Then you can use vi to edit the file called root. Within vi the “:r filename” function is the easy way to import a block of lines from a file called filename).
After reviewing your new crontab, submit it with “crontab root”.
Using this method if you find that you have made an editing error, you still have a copy of the original crontab.

Skriv et svar