33.7. System Customization and Automation (Topic 2.213)
33.7.1. Review Questions
What is the function of the third field in a crontab entry?
Consider the following command:
at 4:00 9/13/08 -f command_file
What is another way to specify this time?
You wish to use the rsync command to copy the local directory of /home/james/backup directory to the /usr/remote/backup directory of the remote system named sandi. What would this command look like?
Create a user-based crontab using the crontab -e command. If you cannot think of any particular command to use, have the command list your home directory and then print the current date. Use the mail command to verify that the script has worked. If the script doesn't work, edit it until you specify the correct commands.
View the scripts in the /etc/cron.hourly, /etc/cron.d/daily, /etc/cron.weekly, and /etc/cron.monthly directories. Notice that some scripts are quite simple, whereas others are more ambitious.
Create a script in the /etc/cron.hourly directory. Use the mail command to verify that the script has worked.
Use the at command to have a command take place one hour from the current time. Issue the atq command to view the status of the command.
This command copies all of the contents of the /home/sandi/essential on the remote system named james to the /backup/sandi directory of the local system. Be able to explain each option used in this command. The -a option enables archiving, which preserves all permissions, symbolic links, and other file elements. The next part of the command specifies the remote system name and the directory on the remote system, including a trailing slash. The final part of the command specifies the destination where the directory is copied.