Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

lp

Synopsis

lp [options] [files]

Sends files to the printer. With no arguments, prints standard input. Part of the Common Unix Printing System (CUPS).

Options

-c

Copy files to print spooler; if changes are made to file while it is still queued for printing, the printout is unaffected. This option has no effect when used with a CUPS server, which performs in a similar manner already.

-d dest

Send output to destination printer named dest.

-E

Force an encrypted connection if supported by the print server.

-h host

Send print job to to print server host, localhost by default.

-H action

Print according to the named action: hold (notify before printing), resume (resume a held request), immediate (print next; privileged users only).

-i IDs

Override lp options used for request IDs currently in the queue; specify new lp options after -i. For example, change the number of copies sent.

-m

Send mail after files are printed (not supported in CUPS as of Version 1.1.15).

-n number

Specify the number of copies to print.

-o options

Set one or more printer options. CUPS documentation describing these options is included with Mac OS X and viewable via a web browser using http://127.0.0.1:631/sum.html#STANDARD_OPTIONS.

-P list

Print only the page numbers specified in list.

-q n

Print request with priority level n, increasing from 1 to 100. The default is 50.

-s

Suppress messages.

-t title

Use title for the print job name.

Example

Print five copies of a formatted manpage:

                     man -t niutil | lp ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata