Commit | Line | Data |
---|---|---|
b42074ab | 1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
929f44b0 | 2 | .\" All rights reserved. |
89b3926c | 3 | .\" |
58bd7e0b | 4 | .\" %sccs.include.redist.man% |
929f44b0 | 5 | .\" |
b42074ab | 6 | .\" @(#)lpc.8 6.4 (Berkeley) %G% |
89b3926c | 7 | .\" |
b42074ab CL |
8 | .Dd |
9 | .Dt LPC 8 | |
10 | .Os BSD 4.2 | |
11 | .Sh NAME | |
12 | .Nm lpc | |
13 | .Nd line printer control program | |
14 | .Sh SYNOPSIS | |
15 | .Nm lpc | |
16 | .Oo | |
17 | .Ar command | |
18 | .Op Ar argument ... | |
19 | .Oc | |
20 | .Sh DESCRIPTION | |
21 | .Nm Lpc | |
89b3926c KM |
22 | is used by the system administrator to control the |
23 | operation of the line printer system. | |
b42074ab CL |
24 | For each line printer configured in |
25 | .Pa /etc/printcap , | |
26 | .Nm lpc | |
89b3926c | 27 | may be used to: |
b42074ab CL |
28 | .Bl -bullet -offset indent |
29 | .It | |
89b3926c | 30 | disable or enable a printer, |
b42074ab | 31 | .It |
89b3926c | 32 | disable or enable a printer's spooling queue, |
b42074ab | 33 | .It |
89b3926c | 34 | rearrange the order of jobs in a spooling queue, |
b42074ab | 35 | .It |
89b3926c KM |
36 | find the status of printers, and their associated |
37 | spooling queues and printer dameons. | |
b42074ab CL |
38 | .El |
39 | .Pp | |
89b3926c | 40 | Without any arguments, |
b42074ab | 41 | .Nm lpc |
89b3926c KM |
42 | will prompt for commands from the standard input. |
43 | If arguments are supplied, | |
b42074ab | 44 | .Nm lpc |
89b3926c KM |
45 | interprets the first argument as a command and the remaining |
46 | arguments as parameters to the command. The standard input | |
47 | may be redirected causing | |
b42074ab | 48 | .Nm lpc |
89b3926c KM |
49 | to read commands from file. |
50 | Commands may be abreviated; | |
51 | the following is the list of recognized commands. | |
b42074ab CL |
52 | .Pp |
53 | .Bl -tag -width Ds -compact | |
54 | .It Ic \&? No [ command ... ] | |
55 | .It Ic help No [ command ... ] | |
89b3926c KM |
56 | Print a short description of each command specified in the argument list, |
57 | or, if no arguments are given, a list of the recognized commands. | |
b42074ab CL |
58 | .Pp |
59 | .It Ic abort No {\ all\ |\ printer\ } | |
89b3926c KM |
60 | Terminate an active spooling daemon on the local host immediately and |
61 | then disable printing (preventing new daemons from being started by | |
b42074ab | 62 | .Xr lpr ) |
89b3926c | 63 | for the specified printers. |
b42074ab CL |
64 | .Pp |
65 | .It Ic clean No {\ all\ |\ printer\ } | |
0edd7210 KM |
66 | Remove any temporary files, data files, and control files that cannot |
67 | be printed (i.e., do not form a complete printer job) | |
89b3926c | 68 | from the specified printer queue(s) on the local machine. |
b42074ab CL |
69 | .Pp |
70 | .It Ic disable No {\ all\ |\ printer\ } | |
0edd7210 KM |
71 | Turn the specified printer queues off. This prevents new |
72 | printer jobs from being entered into the queue by | |
b42074ab CL |
73 | .Xr lpr . |
74 | .Pp | |
75 | .It Ic down No {\ all\ |\ printer\ } message ... | |
0edd7210 | 76 | Turn the specified printer queue off, disable printing and put |
b42074ab | 77 | .Em message |
0edd7210 KM |
78 | in the printer status file. The message doesn't need to be quoted, the |
79 | remaining arguments are treated like | |
b42074ab | 80 | .Xr echo 1 . |
0edd7210 | 81 | This is normally used to take a printer down and let others know why |
b42074ab CL |
82 | .Xr lpq 1 |
83 | will indicate the printer is down and print the status message). | |
84 | .Pp | |
85 | .It Ic enable No {\ all\ |\ printer\ } | |
89b3926c KM |
86 | Enable spooling on the local queue for the listed printers. |
87 | This will allow | |
b42074ab | 88 | .Xr lpr 1 |
89b3926c | 89 | to put new jobs in the spool queue. |
b42074ab CL |
90 | .Pp |
91 | .It Ic exit | |
92 | .It Ic quit | |
89b3926c | 93 | Exit from lpc. |
b42074ab CL |
94 | .Pp |
95 | .It Ic restart No {\ all\ |\ printer\ } | |
89b3926c KM |
96 | Attempt to start a new printer daemon. |
97 | This is useful when some abnormal condition causes the daemon to | |
98 | die unexpectedly leaving jobs in the queue. | |
b42074ab | 99 | .Xr Lpq |
89b3926c | 100 | will report that there is no daemon present when this condition occurs. |
0edd7210 KM |
101 | If the user is the super-user, |
102 | try to abort the current daemon first (i.e., kill and restart a stuck daemon). | |
b42074ab CL |
103 | .Pp |
104 | .It Ic start No {\ all\ |\ printer\ } | |
89b3926c | 105 | Enable printing and start a spooling daemon for the listed printers. |
b42074ab CL |
106 | .Pp |
107 | .It Ic status No {\ all\ |\ printer\ } | |
89b3926c | 108 | Display the status of daemons and queues on the local machine. |
b42074ab CL |
109 | .Pp |
110 | .It Ic stop No {\ all\ |\ printer\ } | |
89b3926c KM |
111 | Stop a spooling daemon after the current job completes and disable |
112 | printing. | |
b42074ab CL |
113 | .Pp |
114 | .It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ] | |
89b3926c | 115 | Place the jobs in the order listed at the top of the printer queue. |
b42074ab CL |
116 | .Pp |
117 | .It Ic up No {\ all\ |\ printer\ } | |
0edd7210 | 118 | Enable everything and start a new printer daemon. Undoes the effects of |
b42074ab CL |
119 | .Ic down . |
120 | .Sh FILES | |
121 | .Bl -tag -width /var/spool/*/lockx -compact | |
122 | .It Pa /etc/printcap | |
123 | printer description file | |
124 | .It Pa /var/spool/* | |
125 | spool directories | |
126 | .It Pa /var/spool/*/lock | |
127 | lock file for queue control | |
128 | .El | |
129 | .Sh SEE ALSO | |
130 | .Xr lpd 8 , | |
131 | .Xr lpr 1 , | |
132 | .Xr lpq 1 , | |
133 | .Xr lprm 1 , | |
134 | .Xr printcap 5 | |
135 | .Sh DIAGNOSTICS | |
136 | .Bl -tag -width Ds | |
137 | .It Sy "?Ambiguous command" | |
138 | abreviation matches more than one command | |
139 | .It Sy "?Invalid command" | |
140 | no match was found | |
141 | .It Sy "?Privileged command" | |
142 | command can be executed by root only | |
143 | .El | |
144 | .Sh HISTORY | |
145 | The | |
146 | .Nm | |
147 | command appeared in | |
148 | .Bx 4.2 . |