lpmove Command in Linux



The lpmove command in Linux is a powerful tool for managing print jobs within the Common Unix Printing System (CUPS). It allows you to efficiently move print jobs between different printers or destinations, providing flexibility and control over your printing workflow.

Table of Contents

Here is a comprehensive guide to the options available with the lpmove command −

Understanding the lpmove Command

The lpmove command in Linux is a powerful tool for managing print jobs within the Common Unix Printing System (CUPS). It allows you to efficiently move print jobs between different printers or destinations, providing flexibility and control over your printing workflow −

lpmove
lpmove Command in Linux1

The lpmove command offers additional options to customize its behavior. The -E option forces encryption when connecting to the CUPS server, ensuring secure communication. The -U option allows you to specify an alternative username for authentication. Finally, the -h option lets you specify an alternate CUPS server to interact with.

How to Use lpmove Command in Linux?

The lpmove command in Linux is a versatile tool for managing print jobs within the Common Unix Printing System (CUPS). It allows you to efficiently move print jobs between different printers or destinations, offering flexibility and control over your printing workflow.

Here's a breakdown of the most commonly used options with lpmove

Basic Usage

The most common usage of lpmove involves specifying the job ID or the original destination and job ID, and the new destination. The fundamental syntax for lpmove is −

lpmove job_id destination

Here −

  • job_id − The unique identifier of the print job you want to move.
  • destination − The name of the printer or class to which you want to move the job.

lpmove Command Options

The lpmove command offers additional options to customize its behavior −

Options Description Commands
-U username Specifies an alternate username for authentication. This is helpful when you need to authenticate as a different user. lpmove -U user123 123 newprinter
-h server[:port] Specifies an alternate CUPS server to interact with. This is useful when you're managing print jobs on a remote server. lpmove -h print-server.example.com 123 newprinter
-E Forces encryption when connecting to the CUPS server. This ensures secure communication between the client and the server. lpmove -E 123 newprinter

Examples of lpmove Command in Linux

Move print job number

The most common usage of lpmove involves specifying the job ID or the original destination and job ID, and the new destination. To move print job number 123 to a printer named "new_printer," you would use −

lpmove 123 new_printer

This moves job number 123 to the printer named "newprinter".

Moving All Jobs from One Destination to Another

You can also move all jobs from one destination to another. For instance, to move all jobs from a printer named "old_printer" to "new_printer," you would use −

lpmove old_printer new_printer

This moves all jobs from the printer "oldprinter" to "newprinter".

Move Job 123 to a printer on a remote server

To move job 123 to a printer on a remote server, using a specific username and forcing encryption. It forces encryption when connecting to the CUPS server, ensuring secure communication, use −

lpmove -E -U my_username -h print_server.example.com 123 new_printer

By effectively utilizing the lpmove command and its options, you can streamline your printing workflow, redirect print jobs to different destinations, and enhance your overall printing experience.

Specifies an alternate username for authentication

Specifies an alternative username for authentication. This is helpful when you need to authenticate as a different user.

lpmove -U user123 123 newprinter

Moving a specific job

This moves job number 123 to the printer named "newprinter".

lpmove 123 newprinter

Moving all jobs from one destination to another

This moves all jobs from the printer "oldprinter" to "newprinter".

lpmove oldprinter newprinter

Specify the Job ID

To use lpmove, you need to specify the job ID or the original destination and job ID of the print job you want to move, along with the new destination. For example, to move job number 123 to a printer named "newprinter," you would use the command −

lpmove 123 newprinter

Move all jobs from one destination to another

You can also move all jobs from one destination to another. For instance, to move all jobs from the printer "oldprinter" to "newprinter," you would use −

lpmove oldprinter newprinter

By understanding and utilizing the lpmove command, you can effectively manage your print jobs, redirect them to different printers, and streamline your printing processes.

By effectively using these options, you can gain fine-grained control over your print jobs and optimize your printing workflow.

Conclusion

The lpmove command is a utility used to transfer print jobs from one printer queue to another. This is particularly useful when you need to redirect a print job to a different printer or when you want to move a print job to a different queue for prioritization or other reasons.

The lpmove command in Linux is a powerful tool for managing print jobs within the Common Unix Printing System (CUPS). It allows you to efficiently move print jobs between different printers or destinations, providing flexibility and control over your printing workflow.

Advertisements