The reject
command instructs the printing system to reject print jobs to the specified target printer. This command is useful when a printer is malfunctioning or undergoing maintenance and needs to be temporarily taken offline. The command can be executed by a user with root privileges.
The general syntax for the reject
command is as follows:
reject [options] <printer>
Where <printer>
is the name of the target printer. The reject
command can be used with various options to customize its behavior.
Examples
To reject all print jobs to the printer named laserjet
, execute the following command:
reject laserjet
To reject all print jobs to the printer named inkjet
and display a message to the user, execute the following command:
reject -m "The inkjet printer is currently offline for maintenance" inkjet
Options
The following table lists all available options for the reject
command:
Option | Description |
---|---|
-h, –help | Display help information and exit |
-m MESSAGE, –message=MESSAGE | Display a message to the user when the print job is rejected |
-r, –remove | Remove the printer’s rejection status |
-R, –reject | Reject the printer’s print jobs (default) |
Troubleshooting Tips
If the reject
command does not seem to be working, ensure that the user executing the command has root privileges. Additionally, check that the printer name is spelled correctly and that the printer is currently connected and available.
Notes
- The
reject
command can be used in conjunction with other printing system commands, such asaccept
andenable
, to manage printers and print jobs. - The
reject
command only affects print jobs sent to the specified printer after the command has been executed. Print jobs that were already in the queue before the command was executed will continue to be processed.