1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<link rel="STYLESHEET" href="../term_tools/main.css" type="text/css">
<title>lprm MAN Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body><!-- #BeginLibraryItem "/Library/head_bash.lbi" --><div id="nav-menu">
<ul>
<li><a class="rl" href="../term_tools/index.html"><img src="../term_tools/images/ss64.gif" title="Home" alt="Home"></a></li>
<li><a class="rl" href="../term_tools/bash"><img src="../term_tools/images/bash-l.gif" title="bash" alt="bash"></a></li>
<li><!-- Search Google -->
<form action="http://www.google.com/search" method="get" style="margin:0px;padding:0px;">
<div align="right">
<input name="q" type="text" class="body" size="25">
<input class="submit" type="submit" value="Search">
<input type="hidden" name="q" value="site:ss64.com/bash/">
</div>
</form></li>
<li><a class="rr" href="syntax.html"><img src="../term_tools/images/syntax-r.gif" title="Bash Syntax"></a></li>
</ul>
</div> <!-- #EndLibraryItem --><h1> lprm</h1>
<p>Remove jobs from the line printer spooling queue</p>
<pre>Syntax
lprm [-P<em>printer</em>] [-] [<em>job# </em>...] [<em>user</em> ...]
Options and arguments:
-P<em>printer</em>
Specify the queue associated with a specific printer (otherwise
the default printer is used).
- If a single `-' is given, lprm will remove all jobs which a user
owns. If the super-user employs this flag, the spool queue will
be emptied entirely.
<em>user</em> Causes lprm to attempt to remove any jobs queued belonging to
that user (or users). This form of invoking lprm is useful only
to the super-user.
<em>job#</em> A user may dequeue an individual job by specifying its job number.
This number may be obtained from the lpq(1) program, e.g.
% lpq -l
1st:ken [job #013ucbarpa]
(standard input) 100 bytes
% lprm 13
If neither arguments or options are given, lprm will delete the currently
active job if it is owned by the user who invoked lprm.
lprm announces the names of any files it removes and is silent if there
are no jobs in the queue which match the request list.
lprm will kill off an active daemon, if necessary, before removing any
spooling files. If a daemon is killed, a new one is automatically
restarted upon completion of file removals.
Environment
If the following environment variable exists, it is utilized by lprm.
PRINTER If the environment variable PRINTER exists, and a printer has
not been specified with the -P option, the default printer is
assumed from PRINTER.
Files
/etc/printcap Printer characteristics file.
/var/spool/* Spooling directories.
/var/spool/*/lock Lock file used to obtain the pid of the current daemon
and the job number of the currently active job.
</pre>
<p><span class="body"> Lprm will remove a job, or jobs, from a printer's spool queue. </span></p>
<p><span class="body">Since the
spooling directory is protected from users, using Lprm is normally the
only method by which a user may remove a job. </span></p>
<p><span class="body">The owner of a job is determined by the user's login name and host name on the machine where the
lpr command was invoked.</span></p>
<p><span class="body">Bug:
since there are race conditions possible in the update of the lock file,
the currently active job may be incorrectly identified.<br>
<br>
ERROR Messages:
`Permission denied' if the user tries to remove files other than their own.</span></p>
<p><i>"Because I could not stop for Death - <br>
He kindly stopped for me<br>
The carriage held but just ourselves - <br>
And Immortality..." - Emily
Dickinson</i></p>
<p><b>Related</b>:<br>
<br>
<a href="lpc.html">lpc</a> - Line printer control program<br>
<a href="lpr.html">lpr</a> - Off line print <br>
lprint - Print a file<br>
lprintd / lpd(8) - Abort a print job<br>
lprintq / lpq(1) - List the print queue<br>
pr(1) - Convert text files for printing <br>
printcap(5) - Printer Capability database<br>
<a href="symlink.html">symlink</a> - Make a new name for a file <br>
Equivalent Windows command: <a href="../term_tools/nt/net.html">NET</a> PRINT - Manage print jobs</p>
<!-- #BeginLibraryItem "/Library/foot_bash.lbi" --><p align="left"><script type="text/javascript"><!--
google_ad_client = "pub-6140977852749469";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="1984328893";
google_color_border = "CCCCCC";
google_color_bg = "CCCCCC";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br>
</p>
<div align="center"><hr size="1">
<p id="top"><a href="#"><img src="../term_tools/images/top-4.gif" width="47" height="53" border="0" alt="Back to the Top" title="Back to the Top"></a></p>
<p class="tagline">© Copyright <a href="http://ss64.com/">SS64.com</a> 1999-2010<br>
Some rights reserved<br>
</p>
</div><!-- #EndLibraryItem --></body>
</html>
|