FINAL TRIM SIZE : 7.0 in x 8.5 in
4
Viewing and Printing Files
The
more
command displays a text le's con
tents on the screen. F
or example,
the following line displa
ys the contents of
myfile
:
$ more myfile
This is the text of "myfile", which I had previously
entered.
$
If the le contains more lines than are on y
our screen,
more
pauses when the
screen is full. With a longer le, y
ou can press
4
space
5
to continue lo oking at
additional screens, and press
4
Q
5
when you are nished. Then
more
returns you
to the system prompt.
For using the
vi
text editor, see \Editing Files", in this chapter.
Printing a File with lp
If your system is appropriately congured, you can print a text le using the
lp
(
l
ine
p
rinter) command. Before using the
lp
command you may need to
nd out whether your system is set up so that you can use the
lp
command.
If it is not, basic installation information is in Chapter 5, in this man
ual. You
can nd detailed information on installing and conguring prin
ters in
System
Administration Tasks
.
If
lp
does work on your system, you may also need to nd out the lo cation of
the printer, on an extensive system. When you have this information, print
myfile
by running the
lp
command:
$ lp myfile
If the
lp
command is working properly, it should display a message indicating
that it sentyour le to the printer. For example:
request id is lp-
number
(1 file)
The
number
is an i.d. numb er assigned to the print job by the
lp
command. If
you don't see this message, or if you get an error message, consult your system
administrator. If
lp
works successfully,you should get a printout with your
username displayed on the rst page. The time required for a printout depends
on the number of tasks b eing run by the system and the sp eed of the printer.
4-12 Using the Command Line DRAFT
2/5/97 11:31