nerdexam
CompTIA

LX0-104 · Question #453

What command should be entered to print and then delete the file, foobar.txt?

The correct answer is C. lpr -r foobar.txt. The lpr command sends files to the printer spooler and includes an option to automatically remove the original file after it has been spooled.

Essential System Services

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

How the community answered

(45 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    91% (41)
  • D
    2% (1)

Why each option

The `lpr` command sends files to the printer spooler and includes an option to automatically remove the original file after it has been spooled.

Alpr -0 delete foobar.txt

The `-0` option is not typically used for file removal, and `delete` is not a valid option to remove the file after printing with `lpr`.

Blpr -d foobar.txt

The `-d` option in `lpr` usually specifies the destination printer or class, not to delete the source file.

Clpr -r foobar.txtCorrect

The `lpr -r foobar.txt` command sends `foobar.txt` to the print spooler and then automatically removes (deletes) the original file after it has been successfully spooled for printing.

Dlpr -0 remove foobar.txt

The `-0` option is not used for file removal, and `remove` is not a recognized `lpr` option for this purpose.

Concept tested: LPR command options for file management

Source: https://www.cups.org/doc/man-lpr.html

Topics

#lpr command#printing#command-line options

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice