Print the current user's crontab without changing it.
Which command is appropriate?
crontab -l lists the current user's entries; -e edits them and -r removes them.
Detailed explanation
crontab -eIncorrect. -e opens an editor and permits changes.
Incorrect. -e opens an editor and permits changes.
crontab -lCorrect. -l prints the current user's crontab.
Correct. -l prints the current user's crontab.
crontab -rIncorrect. -r deletes the crontab.
Incorrect. -r deletes the crontab.
atqIncorrect. atq lists one-time at jobs, not cron entries.
Incorrect. atq lists one-time at jobs, not cron entries.
Try it yourself
An example you can run in a temporary verification environment.
crontab --help 2>&1 | grep -E -- '(^|[ ,])-l([, ]|$)|list' | head -n 1Expected result
-lまたはlistの説明。実装によりhelp形式は異なるKey points
- -l list
- -e edit
- -r remove
Notes
- Environment: cron実装の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.