Difficulty: Easy
Correct Answer: lp
Explanation:
Introduction / Context:
UNIX systems traditionally use print spoolers to queue and manage print jobs. Two major families exist: System V (lp, lpstat, cancel) and BSD (lpr, lpq, lprm, lpc). Recognizing the correct submit command for your platform is vital in mixed environments and exams.
Given Data / Assumptions:
Concept / Approach:
System V printing uses lp to send a file to the queue. Options select destination printers, copies, and banner pages. The BSD toolset uses lpr for submission. Many modern systems provide compatibility layers so both sets work, but the native System V submit command remains lp.
Step-by-Step Solution:
Verification / Alternative check:
Confirm printing with lpstat and by checking the printer output. On systems with both toolsets, verify which backend (CUPS) interprets lp commands and how it maps to printers.
Why Other Options Are Wrong:
b: pg is a pager for viewing files page-by-page on screen, not printing.
c, d: prn and print are DOS/Windows commands, not standard UNIX.
e: Not applicable because lp is correct in System V environments.
Common Pitfalls:
Submitting to the wrong default destination, forgetting to specify copies or duplex options, and overlooking that CUPS may unify lp and lpr behavior with different defaults. Always check lpoptions -p printer -l for supported features.
Final Answer:
lp
Discussion & Comments