Forrest logo
back to the lpr tool

lpr:tldr:8feef

lpr: Print to a named printer.
$ lpr -P ${printer} ${filename}
try on your machine

The given command lpr -P ${printer} ${filename} is a Unix/Linux command used for printing files from the command line.

Here is the breakdown of the command:

  • lpr: It is the command-line utility used for sending print jobs to a printer.
  • -P ${printer}: This is an option flag followed by the printer name. ${printer} is a placeholder indicating that you need to replace it with the actual name of the printer you want to use for printing.
  • ${filename}: Similar to the ${printer}, this is another placeholder indicating that you need to replace it with the name or location of the file you want to print.

Together, when you run this command, it will send the file specified by ${filename} to the printer specified by ${printer}.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lpr tool