Bootstrap FreeKB - Linux Commands - pr (format file for printing)
Linux Commands - pr (format file for printing)

Updated:   |  Linux Commands articles

The pr command is intended to format a file for printing. For example, let's say the file named foo.txt has the following content.

Hello World
How are you today?

 

The PR command has a number of options to format the file. -n numbers the list, and -h adds a header named "Greetings".

pr -n -h "Greetings" foo.txt > bar.txt

 

Before printing, you may want to use the lpstat or lpc commands to list the available printers.

There are a few different commands that can be used to sent print jobs to the printer.

  • lp (Line print)
  • lpr (Line print request)
  • lpd (Line print daemon)

The lpq command can be used to view and cancel print jobs in the print queue. The lprm command can be used to remove print jobs.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter a65762 in the box below so that we can be sure you are a human.