Printing of ASCII text or PostScript™
files can be done from the command line using the lp
(Line Printer) command. Do not use this method to print data files
(files created in applications like FrameMaker or Sun's Star Office) or
binary files. The function of the lp
command is to queue data for printing. The Berkeley version of UNIX
uses a variation of the lp
command known as lpr print
spooler. The Solaris computing
environment supports the lp
print spooler. Figure
shows the options available for use with the lp
command.
| Command Format: |
| lp [ -options ] [
filename(s) ] |
Sending Files to a Printer
Figure
shows some examples using the lp command with various options to print
files. The first example sends a file from the user's home directory
(~) to the default printer, which is printer1. An administrator must
set up the default printer in advance. The -7 after the printer
name indicates that this is the seventh print job received since the
printer came online. Although this example prints only one file, it is
possible to send multiple files simultaneously to the printer and
wildcard metacharacters such as * and ? can also be used.
 |
 |
Interactive
Media Activity
(Flash,
95 kB) |
| |
Using
the lp
command
In
this media activity, you are logged in as user2
and your current working directory is
/home/user2/dir2. Type the commands that would
accomplish the following objectives.
Note: Be sure to press enter after each one. Click
on step 1 to begin. |
|
|
|
|