Talk:Lp (Unix)

Latest comment: 9 years ago by Lesser Cartographies in topic Sources

Can do? edit

stuff | lp -d stdout > file.ps

?

Yes we can do that. —Preceding unsigned comment added by 115.242.181.54 (talk) 16:50, 8 May 2010 (UTC)Reply

Cleaned up, but needs sources edit

I just did a major cleanup & added some historic info, but I'm awful at finding "acceptable" sources so others will have to tackle that. To be honest, I'm not even sure if this article should exist on its own; it might be better off as a subsection of a larger article on print commands or something like that. —xyzzy 07:49, 11 November 2013 (UTC)Reply

Sources edit

  • Kofler, Michael (1997). "6.4 Printer Configuration". Linux: Installation, configuration and use. Addison-Wesley. pp. 146–150. ISBN 0-201-17809-5.
  • The issue at this point is how a correctly formatted file finds its way to the printer. Youor printer will normally be connected to one of the parallel interfaces which under Linux are accessed as /dev/lp1... When you want to send a file to the printer, you simply execute a cp command in which you specify the interface device as a target. .... $ cp file /dev/lp1 & Now that's old-school.
  • In order to avoid each Linux user having to know to which device the printer is connected, whether someone else is printing, and so on, the Unix environment has printer control commands that lie between the user and the printer, and thus facilitate printing.
  • Under Linux, printer control normally conforms to the Berkeley system (BSD). If the lpd printer daemon (which is a background process) is configured correctly, a file is simply printed out with lpr file.
  • The Unix world has a second standard for controlling printing: the one defined by System V. Its functionality is similar to the BSD system, but the commands have different names and there are differences in configuration. Under System V, files are printed out with lp file.
  • The remainder of the section deals with lpr.
  • An lp command is required by the POSIX.2 standard.
  • Both lp and lpr take input from stdin if no file is specified, allowing shell piping to be used.
  • ls -l | lp
  • Cutler, Ellie (1994). SCO UNIX in a Nutshell. O'Reilly. pp. 75–76. ISBN 1-56592-037-6.
For SCO UNIX System V Release 3.2 Version 4.0, both lp and lpr are available, but lpr is just a link to lp.
  • Arthur, Lowell Jay (1986). Unix Shell Programming. John Wiley & Sons. p. 190. ISBN 0-471-84932-4.
  • A line printer (lp) spooler was added to UNIX Version 4 and later versions. Lp allows the system administrator to define the types of printers on the system. Then each user can spool files to a printer without actually logging on. The printout can be picked up later at the user's convenience. Lp can even send the user mail when the file finishes printing.
  • Rosen, Kenneth H.; Rosinski, Richard R.; Farber, James M. (1990). UNIX System V Release 4: An Introduction for New and Experienced Users. Osborne McGraw-Hill. pp. 117–121. ISBN 0-07-881552-5.
  • The UNIX System includes a collection of programs, called the lp system, for printing files and documents. You can use it to print everything from simple text files to large documents with complex formats. It provides a simple, uniform interface to a wide variety of printers, ranging from desktop dot matrix machiens to sophisticated laser typesettes.
  • The lp system is itself large and complex, but fortunately its complexity is well hidden from users. In fact, three basic commands, lp, lpstat, and cancel, are all you need to know to use this system.
  • lp supports over 20 options that all you to control the number of copies that are printed and their appearance, as well as to control the print queue.
  • UNIX in a Nutshell, Berkeley Edition. O'Reilly. 1990. p. 1–45. ISBN 0-937175-20-X.
  • Provides a list of lpr command line parameters in case anyone wants to compare & contrast with lp (provided in SCO UNIX, and elsewhere).
  • Sobell, Mark G. (1985). A Practical Guide to UNIX System V. Benjamin/Cummings. pp. 45–46. ISBN 0-8053-8915-6.
  • The lp utility displays a line of information that contains a request number each time you ask it to print a file.... You can use these request numbers to check on the progress of or cancel a printing job.
  • Nemeth, Evi; Snyder, Garth; Seebass, Scott (1989). "Printing Under ATT". UNIX System Administration Handbook (1st ed.). Prentice Hall. pp. 164–173. ISBN 0-13-933441-6. Note that the following chapter details printing under BSD.
  • Only lp can queue data for printing. lp takes input and places it in a file in the spool directory appropriate for its final destination.
  • lp system commands [in table format in the book] accept: Begin accepting jobs to be queued. cancel:Cancel a queued or printing job. disable: Disable printing to a device. enable: Enable printing to a device. lp Queue jobs for printing. lpadmin: Configure the printing system. lpmove: Move jobs from one device to another. lpsched:lp scheduling daemon. lpshut:Disable lpsched. lpstat: Show the status of the system. reject: Stop accepting jobs to be queued.
  • Describes UNIX System V.
  • Smith, Roderick W. (2003). "Managing Printers". Linux Power Tools. SYBEX. pp. 269–284. ISBN 0-7821-4226-5.
  • The three Linux printing systems are the original Berkeley Standard Distribution Line Printer Daemon (BSD LPD), the next-generation LPRng, and the Common Unix Printing System (CUPS).
  • [in table 13.1] Debian GNU/Linux 3.0: standard BSD LPD; alternative LPRng, CUPS. Mandrake Linux 9.1: CPUS;LPRng. Red Hat Linux 8.1: CUPS;LPRng. Slackware Linux 9.0: LPRng;none. SuSE 8.1: CUPS;none.
  • BSD LPD is the oldest of the Linux printing systems, and Linux distributions have been moving away from it in recent years.
  • LPRng was designed as a drop-in replacement for BSD LPD.
  • CUPS was developed, in part, to address the shortcomings of BSD LPD and LPRng in terms of print queue/application communication and network print client/server communication.
  • Welsh, Matt; Kaufman, Lar (1995). Running Linux (1st ed.). O'Reilly. p. 33. ISBN 1-56592-100-3.
  • The Linux printing software consists of the UNIX standard lp and lpr software.
  • Text is unchanged in the 2nd (1996) edition.
  • Welsh, Matt; Dalheimer, Kalle; Kaufman, Lar (1999). Running Linux (3rd ed.). O'Reilly. pp. 323–330. ISBN 1-56592-469-X.
  • The lpr command prints a document on Linux. lp doesn't appear to be mentioned at all.
  • Identical text on page 336 in the 4th (2003) edition.


Thanks to the good folks at U Minnesota for allowing visiting scholars (and anyone else) into their stacks. Lesser Cartographies (talk) 21:09, 6 September 2014 (UTC)Reply