Interpret a line in /etc/crontab containing backup.
0 4 * * * backup /usr/local/sbin/archiveWhat does backup represent?
System crontab files include an execution-user field between the five time fields and the command.
Detailed explanation
Incorrect. /etc/crontab has no separate job-name field here.
Incorrect. /etc/crontab has no separate job-name field here.
Correct. backup is the user under which the command runs.
Correct. backup is the user under which the command runs.
Incorrect. Output destinations are controlled by command redirection or mail settings.
Incorrect. Output destinations are controlled by command redirection or mail settings.
Incorrect. The shell is configured separately, such as with SHELL=.
Incorrect. The shell is configured separately, such as with SHELL=.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s\n' '0 4 * * * backup /usr/local/sbin/archive' | awk '{print $6}'Expected result
backupKey points
- After five time fields
- Sixth field is user
- Not in user crontab
Notes
- Environment: awk / 合成system crontab行
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.