lp (Unix)

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found. The lp system was the print system provided by the UNIX System V family of operating systems. It was similar in functionality to the Berkeley Software Distribution-based lpr system, and has been supplanted by the LPRng and CUPS systems. lp was also the name of the command used to move documents into the print spool, or queue. Like similarly-named commands on ITS, DEC, CP/M, and 86-DOS[citation needed], it was originally an acronym for terms like line print(er) and local print(er). However, the commands stopped being specific to particular devices in the 1980s, and today are used with any printer compatible with the operating system itself.

Background

In the Unix programming model, devices such as printers are represented as just another file in the filesystem. For example, the first line printer on a system might be represented by a file "lp1" in the device ("dev") directory, i.e. /dev/lp1. Using the file metaphor, a document could by printed by "copying" the file onto the device: cp document /dev/lp1. While this worked well enough for the case where there was one printer per user, this model did not scale out well to multiple users having to share one printer.[1] The solution was to create a queue (or spool) of documents to be printed and allow a system daemon to print the documents in the order in which they arrived.

Description

The lp system was first introduced in 1973 in Version 4 of Unix.[2] By the release of System V Release 4, the suite of utilities had grown to include commands for canceling print jobs, moving jobs among queues, enabling and disabling queues, enabling and disabling a job scheduler daemon, and status reports of the print system.[3] The lp command handled queue documents to be printed[3] and had over 20 different options that controlled the appearance of the document and its place in the queue,[4] and even handled email notification of the user once the document had finished printing.[2] The command returned a "job id" which could be used by the cancel or lpstat commands to remove the job from the queue or check on its progress, respectively.[5] While the system was considered to be quite complex to set up and administer, most uses were expected to only use these three commands.[4]

Criticism

In his introduction to a simplified configuration system for lp, author Peter Gray of the University of Wollongong described several weaknesses of the version shipping with the then-current Solaris (operating system) version 2.

  • As opposed to the single daemon used by the simpler BSD lpr system, the lp system used separate daemons, one for scheduling and one for remote communication.
  • The lpr system could be controlled with a single configuration file while lp requires a separate program for administration.
  • The lp system did support permissions, but the model did not scale to hundreds of users.

As a result, Gray observed that "many administrators choose to simply run the old lpr/lpd system on the SVR4 boxes."[6]

History

With its distribution in the influential AT&T Unix, the interface if not the implementation became the standard for users' control over printers. The lp command was included as a requirement in the POSIX.2 standard,[7] and a command by that name appeared in the subsequent lpr, LPRng and CUPS printing systems. (In SV4R derivates like SCO UNIX, the lp command was simply an alias for the lpr command used by the BSD-based lpr system.[8])

As late as 1996, Running Linux stated "The Linux printing software consists of the UNIX standard lp and lpr software,"[9] but by 1999 support for lp was waning and the third edition simply stated "The lpr command prints a document on Linux." [10] By 2003, a survey of the Debian, Mandrake, Red Hat, Slackware and SuSE distributions showed that all of them were running some combination of lpr, LPRng and CUPS.[11]

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. 2.0 2.1 Lua error in package.lua at line 80: module 'strict' not found.
  3. 3.0 3.1 Lua error in package.lua at line 80: module 'strict' not found.
  4. 4.0 4.1 Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.

External Links

Selected documentation from various operating systems.