
In UNIX, you give your printers names. You could call your little HP Deskjet printer 'jet'. The host's large line printer could be called 'bigboy'. The laser could be called 'lassy'.
When you configure UNIX on your machine, you specify which printer is going to be your default printer. It does not have to be the one that is connected directly to your machine. Your machine may not have one. When you do not specify any printer, UNIX uses your default printer. Otherwise when you give a print command you specify the printer to be used as follows:

When you use the lp command to print something, it does not actually do the printing itself. It merely creates a print request which it puts on UNIX's print request queue. A print daemon deep within UNIX then handles the print requests in turn from the queue and performs the actual printing task as shown below.

This means that a lot of users on different terminals can each submit print requests to the same printer at the same time and they get put on the queue to be carried out in order without getting mixed up.
When you issue a print request such as lp file1, UNIX confirms your request by giving it a job number which it displays as follows.

This allows you to identify the job later if anything goes wrong and you have to try to find out what has happened to it.
The lp command prints straight from the original file file1. So if after having placed the print request, you delete file1 before the print daemon has got around to printing it, the daemon will not be able to find it. To avoid this, you can tell the lp command to copy it to a print spool file first before putting the print request on the queue as follows.

The Berkeley command lpr spools print automatically. To stop it doing so type lpr -s file1. Useful for big files as spooling takes extra time and disk space which you may not have. Berkeley also has the facility to print-then-delete a file, lpr -r file1. So to print-then-delete a large file you type lpr -s -r file1.
BERKELEY BSD lpr only:
-s suppress the automatic spooling of your file before printing
-r automatically erase your actual file after having printed it
lpstat -a all
| bigboy | accepting requests since 13:43:50 Thu 25 Apr 1991 |
| jet | accepting requests since 10:20:13 Fri 12 May 1993 |
| lassy | accepting requests since 09:15:22 Mon 19 Jun 1994 |
The report tells you when each printer was installed and put on-line. For an individual printer, you type its name:
lpstat -a jet
jet accepting requests since 10:20:13 Fri 12 May 1993
If you type lpstat without any arguments you get the current status of each print request on the print queue as follows:

cancel lassy-2620
request "lassy-2620" cancelled
If you want to cancel all the pending jobs on a given printer, type:
cancel lassy
NOTE: If the printer has an internal buffer, a lot of the file may still be in the buffer when you cancel the request. The printer may therefore carry on printing for 20 pages or more unless you clear or reset the printer's internal buffer.
lpq -a
| bigboy: | ||||
| Rank | Owner | Job | Files | Total Size |
| 1st | eustace | 7 | file1 | 4615 bytes |
| lassy: | ||||
| Rank | Owner | Job | Files | Total Size |
| 2nd | eustace | 23 | file2 | 250327 bytes |
| jet: | ||||
| Rank | Owner | Job | Files | Total Size |
| 3rd | sharon | 12 | email1 | 438 bytes |
To get the current status of only those printers which are currently active or have request pending in their queues, type lpq on its own.
To cancel a print request you refer to it by its job number, in this case 23 as follows:
lprm 23
Berkeley BSD responds with some utter gibberish that only a UNIX guru can understand.

pr can also print the contents of two or more files side-by-side in columns:
