1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Job Removal</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="UP" title="Print Spooling Tutorial " href= 12 "tutorial.htm"> 13 <link rel="PREVIOUS" title="Controlling the Print Queue" href= 14 "controllingprintqueue.htm"> 15 <link rel="NEXT" title="Print Job Filters" href= 16 "printjobfilters.htm"> 17 </head> 18 19 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 20 "#0000FF" vlink="#840084" alink="#0000FF"> 21 <div class="NAVHEADER"> 22 <table summary="Header navigation table" width="100%" border= 23 "0" cellpadding="0" cellspacing="0"> 24 <tr> 25 <th colspan="3" align="center">LPRng Reference Manual: 5 26 Sep 2003 (For LPRng-3.8.22)</th> 27 </tr> 28 29 <tr> 30 <td width="10%" align="left" valign="bottom"><a href= 31 "controllingprintqueue.htm" accesskey="P">Prev</a></td> 32 33 <td width="80%" align="center" valign="bottom">Chapter 4. 34 Print Spooling Tutorial</td> 35 36 <td width="10%" align="right" valign="bottom"><a href= 37 "printjobfilters.htm" accesskey="N">Next</a></td> 38 </tr> 39 </table> 40 <hr align="LEFT" width="100%"> 41 </div> 42 43 <div class="SECT1"> 44 <h1 class="SECT1"><a name="JOBREMOVAL">4.8. Job 45 Removal</a></h1> 46 47 <p>Occasionally we print a file and then change our mind and 48 want to cancel the job. The <b class="APPLICATION">lprm</b> 49 command allows us to do this.</p> 50 51 <div class="INFORMALEXAMPLE"> 52 <a name="AEN2141"></a> 53<pre class="SCREEN"> 54 <samp class="PROMPT">h4: {154} %</samp> <kbd class= 55"USERINPUT">lpq</kbd> 56 Printer: lp@h4 (printing disabled) 57 Queue: 3 printable jobs 58 Server: no server active 59 Status: job 'papowell@h4+17922' removed at 18:15:13.981 60 Rank Owner/ID Class Job Files Size Time 61 1 papowell@h4+17959 A 17959 (stdin) 3 18:23:24 62 2 papowell@h4+17962 A 17962 (stdin) 6 18:23:30 63 3 papowell@h4+17970 A 17970 (stdin) 5 18:23:35 64 <samp class="PROMPT">h4: {155} %</samp> <kbd class= 65"USERINPUT">lprm</kbd> 66 Printer lp@h4: 67 checking perms 'papowell@h4+17959' 68 dequeued 'papowell@h4+17959' 69 <samp class="PROMPT">h4: {156} %</samp> <kbd class= 70"USERINPUT">lpq</kbd> 71 Printer: lp@h4 (printing disabled) 72 Queue: 2 printable jobs 73 Server: no server active 74 Status: job 'papowell@h4+17922' removed at 18:15:13.981 75 Rank Owner/ID Class Job Files Size Time 76 1 papowell@h4+17962 A 17962 (stdin) 6 18:23:30 77 2 papowell@h4+17970 A 17970 (stdin) 5 18:23:35 78 <samp class="PROMPT">h4: {157} %</samp> <kbd class= 79"USERINPUT">lprm 17970</kbd> 80 Printer lp@h4: 81 checking perms 'papowell@h4+17970' 82 dequeued 'papowell@h4+17970' 83 <samp class="PROMPT">h4: {158} %</samp> <kbd class= 84"USERINPUT">lpq</kbd> 85 Printer: lp@h4 (printing disabled) 86 Queue: 1 printable job 87 Server: no server active 88 Status: job 'papowell@h4+17922' removed at 18:15:13.981 89 Rank Owner/ID Class Job Files Size Time 90 1 papowell@h4+17962 A 17962 (stdin) 6 18:23:30 91</pre> 92 </div> 93 <br> 94 <br> 95 96 <p>By default, the <b class="APPLICATION">lprm</b> command 97 removes the first job in the queue that the user has 98 permission to remove. Also, as shown in the example, you can 99 remove a job by specifying the job ID or the job number. If 100 you specify a user name, you remove <var class= 101 "LITERAL">all</var> of the user's jobs. This can be 102 dangerous:</p> 103 104 <div class="INFORMALEXAMPLE"> 105 <a name="AEN2156"></a> 106<pre class="SCREEN"> 107 <samp class="PROMPT">h4: {159} %</samp> <kbd class= 108"USERINPUT">lpq</kbd> 109 Printer: lp@h4 (printing disabled) 110 Queue: 3 printable jobs 111 Server: no server active 112 Status: job 'papowell@h4+17922' removed at 18:15:13.981 113 Rank Owner/ID Class Job Files Size Time 114 1 papowell@h4+17962 A 17962 (stdin) 6 18:23:30 115 2 papowell@h4+18499 A 18499 /tmp/hi 3 18:56:00 116 3 papowell@h4+18501 A 18501 /tmp/there 6 18:56:02 117 <samp class="PROMPT">h4: {160} %</samp> <kbd class= 118"USERINPUT">lprm papowell</kbd> 119 Printer lp@h4: 120 checking perms 'papowell@h4+17962' 121 dequeued 'papowell@h4+17962' 122 checking perms 'papowell@h4+18499' 123 dequeued 'papowell@h4+18499' 124 checking perms 'papowell@h4+18501' 125 dequeued 'papowell@h4+18501' 126 <samp class="PROMPT">h4: {161} %</samp> <kbd class= 127"USERINPUT">lpq</kbd> 128 Printer: lp@h4 (printing disabled) 129 Queue: no printable jobs in queue 130 Status: job 'papowell@h4+17922' removed at 18:15:13.981 131</pre> 132 </div> 133 <br> 134 <br> 135 136 <p>The special user <var class="LITERAL">all</var> matches 137 all jobs in a print queue. Clearly you should be careful not 138 to specify <tt class="COMMAND">lprm all</tt> by accident. 139 Even more dangerous is the following command:</p> 140 141 <div class="INFORMALEXAMPLE"> 142 <a name="AEN2167"></a> 143<pre class="SCREEN"> 144 <samp class="PROMPT">h4: {162} %</samp> <kbd class= 145"USERINPUT">lprm -a all</kbd> 146</pre> 147 </div> 148 <br> 149 <br> 150 151 <p>As you might surmise, this removes <var class= 152 "LITERAL">all</var> print jobs in <var class= 153 "LITERAL">all</var> queues, which is an excellent way to 154 purge print queues of all jobs.</p> 155 </div> 156 157 <div class="NAVFOOTER"> 158 <hr align="LEFT" width="100%"> 159 160 <table summary="Footer navigation table" width="100%" border= 161 "0" cellpadding="0" cellspacing="0"> 162 <tr> 163 <td width="33%" align="left" valign="top"><a href= 164 "controllingprintqueue.htm" accesskey="P">Prev</a></td> 165 166 <td width="34%" align="center" valign="top"><a href= 167 "index.htm" accesskey="H">Home</a></td> 168 169 <td width="33%" align="right" valign="top"><a href= 170 "printjobfilters.htm" accesskey="N">Next</a></td> 171 </tr> 172 173 <tr> 174 <td width="33%" align="left" valign="top">Controlling the 175 Print Queue</td> 176 177 <td width="34%" align="center" valign="top"><a href= 178 "tutorial.htm" accesskey="U">Up</a></td> 179 180 <td width="33%" align="right" valign="top">Print Job 181 Filters</td> 182 </tr> 183 </table> 184 </div> 185 </body> 186</html> 187 188