Linux_Foundation
LFCS · Question #453
LFCS Question #453: Real Exam Question with Answer & Explanation
The correct answer is C. lpr -r foobar.txt. To print a file and then automatically delete it after it has been spooled, the lpr command with the -r option is used.
Submitted by alyssa_d· Apr 18, 2026Essential Commands
Question
What command should be entered to print and then delete the file, foobar.txt?
Options
- Alpr -0 delete foobar.txt
- Blpr -d foobar.txt
- Clpr -r foobar.txt
- Dlpr -0 remove foobar.txt
Explanation
To print a file and then automatically delete it after it has been spooled, the lpr command with the -r option is used.
Common mistakes.
- A.
-0 deleteis not a valid or standard option for thelprcommand to remove a file after printing. - B. The
-doption inlpris typically used to specify a destination printer, not to delete the file. - D.
-0 removeis not a valid or standard option for thelprcommand to remove a file after printing.
Concept tested. lpr command options for file handling
Reference. https://www.cups.org/doc/man-lpr.html
Topics
#lpr command#printing#file removal#command-line utilities
Community Discussion
No community discussion yet for this question.