![]() |
![]() |
![]() |
![]() |
![]() |
This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Print on a line printer
lpr [-#num] [-1234font] [-cdfghlmnprstv] [-C class] [-i [numcols]] [-J job] [-Pprinter] [-T title] [-U user] [-wnum] [filename...]
Neutrino
lpr -#3 foo.c bar.c more.c
results 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
gives three copies of the concatenation of the files. Often a site disables this feature to encourage use of a photocopier instead.
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.
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.
![]() |
This utility needs to have the setuid ("set user ID") bit set in its permissions. If you use mkefs, mketfs, or mkifs on a Windows host to include this utility in an image, use the perms attribute to specify its permissions explicitly, and the uid and gid attributes to set the ownership correctly. |
If a user other than root prints a file and spooling is disabled, lpr prints 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 says that the daemon can't be started.
If you try to spool a file that's too large, it's truncated.
If the lpd daemon has any problems (e.g. it can't find the spool file), it might print some diagnostics in its log file.
lpd, lprc, lprq, lprrm, pr, /etc/printcap
Printing chapter of the Neutrino User's Guide
![]() |
![]() |
![]() |
![]() |