Command line printer management
You can use the accept, enable, disable, lpstat, and lp commands to manage a printer from the command line.
You can use the accept command to allow jobs to be sent
to a printer. Run the following command to allow the printer laser to
accept print jobs:
/usr/sbin/accept laserThe printer specified by laser can now receive print job requests.
However, the print jobs will not be printed unless the printer is enabled.
Run the enable command to enable a printer:
/usr/bin/enable laserThe enable and disable commands are administration commands and can only be run by a user with ISSO or SA authorization.
To confirm that the printer was set up properly, run the following lpstat command:
lpstat -p laser -lThis
command displays the long status report of the printer laser. If you
run the lpstat command without the -l option, a
shorter status report displays. If the user is an SA or ISSO authorized and
the -l option is used, the SL range of the printer is also reported.To determine the status of a print request, run the following lpstat command:
lpstat -oThis
command lists all lp print requests. If the user is SA
or ISSO authorized, the effective SL and clearance of each request is reported.To print the filename, run the following lp command:
lp -d laser filenameOtherwise,
you must specify the print job destination when you run the lp command.If a default destination printer has been set by the administrator, the -d destination_ptr option
is not necessary. For example, to print the file filename on the printer laser,
the enter the following lp command:
lp filename