nerdexam
CompTIA

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.

Administrative Tasks

Question

Each entry in a crontab must end with what character?

Options

  • ATab
  • BSpace
  • CBackslash
  • DNewline

How the community answered

(42 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    2% (1)
  • D
    88% (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.

ATab

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.

BSpace

A space character is used as a field separator, similar to a tab, but does not serve as the end-of-line delimiter.

CBackslash

A backslash is used for escaping characters or for line continuation in shell commands, not as a standard crontab entry terminator.

DNewlineCorrect

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

#crontab syntax#scheduled tasks

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice