


LPRM(1)                  USER COMMANDS                    LPRM(1)



NAME
     lprm - remove jobs from the printer queue

SYNOPSIS
     lprm [ -P_p_r_i_n_t_e_r ] [ - ] [ _j_o_b # ...  ] [ _u_s_e_r_n_a_m_e ...  ]

DESCRIPTION
     lprm removes a job or jobs from a printer's spooling  queue.
     Since  the  spool  directory  is protected from users, using
     lprm is normally the only method by which a user can  remove
     a job.

     Without  any  arguments,  lprm  deletes  the  job  that   is
     currently  active,  provided  that the user who invoked lprm
     owns that job.

     When the super-user specifies a _u_s_e_r_n_a_m_e, lprm  removes  all
     jobs belonging to that user.

     You can remove a specific job by supplying its job number as
     an  argument,  which you can obtain using lpq(1).  For exam-
     ple:

          example% lpq -Phost
          host is ready and printing
          Rank    Owner  Job  Files                         Total Size
          active  wendy  385  standard input                35501 bytes
          example% lprm -Phost 385

     lprm reports the names of  any  files  it  removes,  and  is
     silent if there are no applicable jobs to remove.

     lprm kills the active printer daemon, if  necessary,  before
     removing spooled jobs; it restarts the daemon when through.

OPTIONS
     -P_p_r_i_n_t_e_r      Specify the queue associated with a  specific
                    printer.   Otherwise the value of the PRINTER
                    variable in the environment is used.  If this
                    variable  is unset, the queue for the default
                    printer is used.

     -              Remove all jobs owned by you.  If invoked  by
                    the  super-user,  all  jobs  in the spool are
                    removed.  (Job ownership is determined by the
                    user's  login  name  and  host  name  on  the
                    machine where the lpr command was invoked).

FILES
     /etc/printcap       printer characteristics file
     /var/spool/*        spooling directories
     /var/spool/l*/lock  lock file used to obtain the pid of  the



Sun Release 4.1   Last change: 7 September 1988                 1






LPRM(1)                  USER COMMANDS                    LPRM(1)



                         current daemon and the job number of the
                         currently active job

SEE ALSO
     lpr(1), lpq(1), lpd(8)

DIAGNOSTICS
     lprm: _p_r_i_n_t_e_r: cannot restart printer daemon
          The connection to lpd  on  the  local  machine  failed.
          This  usually  means the printer server started at boot
          time has died or is hung.  If it is  hung,  the  master
          lpd(8)  daemon  may  have  to  be  killed and a new one
          started.

BUGS
     Since race conditions are possible when  updating  the  lock
     file,  an active job may be incorrectly identified for remo-
     val by an lprm command issued with no arguments.  During the
     interval  between  an  lpq(1)  command  and the execution of
     lprm, the next job in line may have become active; that  job
     may  be  removed  unintentionally if it is owned by you.  To
     avoid this, supply lprm with the job number to remove when a
     critical job that you own is next in line.

     Only the super-user can remove  print  jobs  submitted  from
     another host.





























Sun Release 4.1   Last change: 7 September 1988                 2



