LinuxCommandLibrary

lpmove

Move print jobs to a new destination

TLDR

Move a specific job to new_printer

$ lpmove [job_id] [new_printer]
copy

Move a job from old_printer to new_printer
$ lpmove [old_printer]-[job_id] [new_printer]
copy

Move all jobs from old_printer to new_printer
$ lpmove [old_printer] [new_printer]
copy

Move a specific job to new_printer on a specific server
$ lpmove -h [server] [job_id] [new_printer]
copy

SYNOPSIS

lpmove job-id destination
lpmove source-printer destination

PARAMETERS

job-id
    Specifies one or more print jobs to be moved. Job IDs are typically in the format printername-jobnumber (e.g., laser-123). Multiple job IDs can be listed separated by spaces.

source-printer
    The name of the printer from which all currently queued print jobs will be moved. This transfers the entire queue to the destination printer.

destination
    The name of the printer to which the specified job(s) or all jobs from the source-printer will be relocated.

DESCRIPTION

lpmove is a command-line utility within the CUPS (Common Unix Printing System) framework used to relocate print jobs. Its primary function is to move specific print jobs from one printer queue to another, or to transfer all pending jobs from a source printer to a different destination printer. This capability is invaluable for administrative tasks such as load balancing print resources, redirecting jobs from a malfunctioning printer, or consolidating print queues. It offers flexibility in managing print flow and ensuring job completion even if a primary printer becomes unavailable. Administrative privileges are usually required to move jobs not owned by the executing user.

CAVEATS

To move jobs not owned by the current user, administrative privileges (e.g., root access or membership in the lpadmin group) are required. The destination printer must exist and be configured within CUPS. Moving active jobs may briefly interrupt printing or alter the job order on the destination printer.

USER PERMISSIONS

Regular users can only move their own print jobs. To move jobs owned by other users or to move all jobs from a printer (using the source-printer syntax), you must have administrative rights, such as being the root user or a member of the lpadmin group.

FINDING JOB IDS

To identify the job-id of pending print jobs, you can use the lpstat -o command. This command lists all active print jobs along with their corresponding IDs, which are necessary for specifying individual jobs to be moved by lpmove.

HISTORY

lpmove is an integral part of the CUPS (Common Unix Printing System) suite, which was initially developed by Easy Software Products before being acquired by Apple Inc. CUPS revolutionized printing on Unix-like systems, including Linux and macOS, by providing a robust, network-aware, and standardized printing architecture. lpmove carries forward the job management capabilities found in older `lp` systems but with the enhanced flexibility and features of CUPS, maintaining a largely consistent usage model since its inception within the CUPS project.

SEE ALSO

lp(1), lpstat(1), cancel(1), accept(8), reject(8), enable(8), disable(8)

Copied to clipboard