disable Command

The disable command includes information for the AIX® Print Subsystem disable and the System V Print Subsystem disable.

Purpose

Disables printer queue devices.

Syntax

disable [ -c ] [ -rReason ] PrinterName ...

Description

The disable command disables or brings offline the printer queue devices specified by the PrinterName parameter.
Note: You must have root user authority or belong to the printq group to run this command.

Flags

Item Description
-c Cancels all job requests. Using this flag is the same as entering the enq -K command.
-rReason Specifies the reason for disabling the printer queue device with the Reason variable. This flag is a no operation flag, which means that the system ignores this flag.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To bring printer queue lp0 offline without waiting for the current print jobs to finish, type:
    disable  -c lp0
  2. To bring printer queue lp0 offline after all print jobs are finished, type:
    disable lp0

Files

Item Description
/usr/sbin/qdaemon Queuing daemon
/etc/qconfig Queue configuration file
/etc/qconfig.bin Digested, binary version of the /etc/qconfig file
/var/spool/lpd/qdir/* Queue requests
/var/spool/lpd/stat/* Information on the status of the devices
/var/spool/qdaemon/* Temporary copies of enqueued files

System V Print Subsystem disable Command

Purpose

Disable LP printers.

Syntax

disable [flags] printers

Description

The disable command deactivates the named printers, disabling them from printing requests submitted by lp. By default, any requests that are currently printing on the designated printers will be reprinted in their entirety either on the same printer or on another member of the same class of printers. If the printer is remote, this command will only stop the transmission of jobs to the remote system. The disable command must be run on the remote system to disable the printer. (Run lpstat -p to get the status of printers.)

Printer names are system-defined words and as such should be restricted to uppercase and lowercase ASCII characters.

If you enter disable -?, the system displays the command usage message and returns 0.

Flags

-c
Cancel any requests that are currently printing on any of the designated printers. This flag cannot be used with the -W flag. If the printer is remote, the -c flag is ignored.
-r reason
Assign a reason for the disabling of the printers. This reason applies to all printers specified. This reason is reported by lpstat -p. reason must be enclosed in quotes if it contains blanks. The default reason is unknown reason for existing printers, and new printer for printers just added to the system but not yet enabled.
-W
Wait until the request currently being printed is finished before disabling the specified printer.

This flag cannot be used with the -c flag. If the printer is remote, the -W flag will be silently ignored.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Files

/var/spool/lp/*