LX0-104 · Question #70
Each entry in a crontab must end with what character?
The correct answer is D. Newline. Every entry within a crontab file, which defines scheduled tasks, must be terminated by a newline character. This ensures that each cron job is correctly interpreted as a distinct command by the cron daemon.
Question
Options
- ATab
- BSpace
- CBackslash
- DNewline
How the community answered
(42 responses)- A7% (3)
- B2% (1)
- C2% (1)
- D88% (37)
Why each option
Every entry within a crontab file, which defines scheduled tasks, must be terminated by a newline character. This ensures that each cron job is correctly interpreted as a distinct command by the cron daemon.
A tab character is used to separate fields within a crontab entry (like minute, hour, day of month, etc.), but not to end the entire entry.
A space character is used as a field separator, similar to a tab, but does not serve as the end-of-line delimiter.
A backslash is used for escaping characters or for line continuation in shell commands, not as a standard crontab entry terminator.
Each line in a crontab file represents a single cron job, and the cron daemon parses these entries by looking for newline characters as delimiters. Without a newline character at the end of each entry, the cron daemon may not correctly parse the last job or could interpret subsequent lines as part of the previous entry.
Concept tested: Crontab entry format
Source: https://linux.die.net/man/5/crontab
Topics
Community Discussion
No community discussion yet for this question.