nerdexam
LPI

102-500 · Question #147

Which of the following commands is used on the command line to send messages to the syslog systems?

The correct answer is C. logger. logger is the standard Unix/Linux command-line utility that allows users and scripts to submit messages directly to the system log (syslog), making it ideal for shell scripts that need to write to /var/log/syslog or similar log files. Why the distractors are wrong: A. lastlog…

Administrative Tasks

Question

Which of the following commands is used on the command line to send messages to the syslog systems?

Options

  • Alastlog
  • Bklog
  • Clogger
  • Dslog
  • Esyslog

How the community answered

(37 responses)
  • B
    3% (1)
  • C
    84% (31)
  • D
    8% (3)
  • E
    5% (2)

Explanation

logger is the standard Unix/Linux command-line utility that allows users and scripts to submit messages directly to the system log (syslog), making it ideal for shell scripts that need to write to /var/log/syslog or similar log files.

Why the distractors are wrong:

  • A. lastlog - displays the most recent login information for all users; it reads login records, not syslog.
  • B. klog - relates to the kernel logging daemon (not a user-facing command for sending messages); it reads kernel messages from /proc/kmsg.
  • D. slog - not a standard Linux command; this is a fictional distractor.
  • E. syslog - syslog is the protocol/facility (and a C library function), not a command-line tool you invoke directly.

Memory tip: Think of logger as "I want to log a message right now" - it's the action word. The others are either daemons, readers, or made-up names. A quick example: logger "Backup completed successfully" writes that string directly to syslog.

Topics

#logger#syslog#system logging#administrative commands

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice