LX0-104 · Question #495
Which of the following commands is used on the command line to send messages to the syslog systems.
The correct answer is C. logger. The logger command is used to send messages from the command line directly to the system log (syslog).
Question
Options
- Alastlog
- Bklog
- Clogger
- Dslog
- Esyslog
How the community answered
(28 responses)- B7% (2)
- C89% (25)
- E4% (1)
Why each option
The `logger` command is used to send messages from the command line directly to the system log (syslog).
lastlog displays the last login time of all users.
klog is not a standard command for sending messages to syslog; `dmesg` is often used for kernel messages.
logger is a utility that provides an interface to the syslog system call, allowing users to add entries to the system log from scripts or the command line. This is particularly useful for debugging or recording custom events within the system logs.
slog is not a standard Linux command for interacting with syslog.
syslog refers to the system logging daemon or protocol, not a command for sending messages.
Concept tested: Sending messages to syslog using logger command.
Source: https://linux.die.net/man/1/logger
Topics
Community Discussion
No community discussion yet for this question.