List pending jobs in printer queue office without changing them.
Which command is appropriate?
lpq displays queue status and -P selects a non-default destination.
Detailed explanation
lpr -P officeIncorrect. lpr submits a new print job.
Incorrect. lpr submits a new print job.
lpq -P officeCorrect. lpq -P office lists the queue.
Correct. lpq -P office lists the queue.
lprm -P officeIncorrect. lprm can cancel jobs.
Incorrect. lprm can cancel jobs.
lpadmin -x officeIncorrect. lpadmin -x deletes a printer configuration.
Incorrect. lpadmin -x deletes a printer configuration.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'lpq: show queue' '-P office: select destination'Expected result
lpq: show queue
-P office: select destinationKey points
- lpq displays queue
- Read-only
- -P selects printer
Notes
- Environment: 役割対応表の表示のみ
- 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.