Terms of Service Privacy Policy Contact Us

leistware.com

Printing

Coping to the Printer


cat [filename] > /dev/lp lp [switches] [filename] lp somefile.txt

The esiest way to print is to copy directly to a print device. One could...

...the catch is only root can do it this way. A more elegant solution is to use lp. lpr, lprm or lpq to access a printer.

CREATED 2016-10-13 13:37:28.0

00-26-AF

UPDATED 2016-10-13 13:37:46.0

lp, lpr


lp [options ] [filename ] cat [filename] > lp

lp is the print command... i.e. Line Printer. Example:

You can also redirect a file into lp...

If no filename is given lp will take input from stdin, usually the keyboard.

lp and lpr are the similar commands as the man pages indicate with slightly different command line switches.

CREATED 2016-10-13 12:29:24.0

00-26-AD

UPDATED 2016-10-13 14:01:24.0

lpq


$ lpq HP_LaserJet_1022 is ready no entries

lpq displays information about the print queues. No arguments displays information about the default print queue.

Other options are:

Option Description
-a Reports jobs on all printers.
-E Forces encryption when connecting to the server.
-h server[:port] Specifies an alternate server.
-l Requests a more verbose (long) reporting format.
-P destination[/instance] Specifies an alternate printer or class name.
-U username Specifies an alternate username.

CREATED 2016-10-13 14:14:04.0

00-26-B0

UPDATED 2016-10-13 14:23:26.0

lprm


lprm i.e. Line Printer ReMove is used to delete or cancel print jobs from a queue. With no options lprm cancels the latest job from the default printer. Other options are:

Option Description
-E Forces encryption when connecting to the server.
-h server[:port] Specifies an alternate server.
-P destination[/instance] Specifies the destination printer or class.
-U username Specifies an alternate username.

CREATED 2016-10-13 14:23:34.0

00-26-B1

UPDATED 2016-10-13 14:23:45.0

lpr: Error - no default destination available.


lpstat -d -p lpstat -a lpoptions -d [printername]

This error means you haven't assigned a default printer. To get a list of available printers on the local machine...

To get a list of available network printers...

To assign a default printer (device) to your system...

CREATED 2016-10-13 12:34:42.0

00-26-AE

UPDATED 2016-10-13 14:23:28.0

Knowledge

Page Server: Ruger

DBID: db.wam

©2012 Leistware Data Systems

      Hello anonymous