Send backup-complete with the identifier tag nightly-backup.
Which command is appropriate?
logger -t TAG MESSAGE adds an identifier tag to the log record.
Detailed explanation
logger -p nightly-backup backup-completeIncorrect. -p selects facility.priority.
Incorrect. -p selects facility.priority.
logger -t nightly-backup backup-completeCorrect. -t nightly-backup sets the message tag.
Correct. -t nightly-backup sets the message tag.
logger -f nightly-backup backup-completeIncorrect. -f reads a file and sends its contents.
Incorrect. -f reads a file and sends its contents.
logger -s nightly-backup backup-completeIncorrect. -s duplicates the message to standard error.
Incorrect. -s duplicates the message to standard error.
Try it yourself
An example you can run in a temporary verification environment.
logger --help | grep -E -- '-t,|--tag'Expected result
tagを指定するhelp行Key points
- -t is tag
- -p is priority
- -s also writes to stderr
Notes
- Environment: util-linux logger help / ログ送信なし
- 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.