remote printing utility
lpr [-Pprinter] [-#num] [-C class] [-J job] [-T title] [-U user] [-i [numcols]] [-wnum] [-p] [-h] [name...]
lpr -C EECS foo.c
causes the system name (the name returned by hostname) to be replaced on the burst page by EECS, and the file foo.c to be printed.
lpr -#3 foo.c bar.c more.c
would result in three copies of the file foo.c, followed by three copies of the file bar.c, etc. On the other hand:
cat foo.c bar.c more.c | lpr -#3
will give three copies of the concatenation of the files. Often a site will disable this feature to encourage use of a photocopier instead.
The lpr utility uses the spooling daemon lpd to print the named files when facilities become available. If no names appear, the standard input is assumed.
If the following environment variable exists, it is used by lpr:
If you try to spool too large a file, it will be truncated.
If a user other than root prints a file and spooling is disabled, lpr will print a message saying so and won't put jobs in the queue.
If a connection to lpd on the local machine can't be made, lpr will say that the daemon can't be started.
Diagnostics may be printed in the daemon's log file regarding missing spool files by lpd.