List available CUPS printers and show the current default destination.
Which command is appropriate?
lpstat -p lists printers and -d reports the default destination.
Detailed explanation
lpstat -o -rIncorrect. -o lists jobs and -r reports scheduler status.
Incorrect. -o lists jobs and -r reports scheduler status.
lpstat -a -vIncorrect. -a and -v show acceptance and device URIs, not the default.
Incorrect. -a and -v show acceptance and device URIs, not the default.
lpstat -c -uIncorrect. It combines classes and user jobs.
Incorrect. It combines classes and user jobs.
lpstat -p -dCorrect. -p and -d provide both requested views.
Correct. -p and -d provide both requested views.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '-p: printers' '-d: default destination'Expected result
-p: printers
-d: default destinationKey points
- -p printers
- -d default
- lpstat is status
Notes
- Environment: option対応表の表示のみ
- 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.