Ls Output From Scrolling - Red Hat ENTERPRISE LINUX 3 - STEP BY STEP GUIDE Manual

Table of Contents

Advertisement

Chapter 12. Frequently Asked Questions
12.6. Tips on Using Command History
What are some other ways I can use command history?
If you type history, a numbered list scrolls by very quickly, showing you the previous 500 com-
mands you have used.
You probably do not need to see all of the last 500 commands, so the command history 20 might
be useful. This way, only the previous 20 commands you typed are displayed (you can use any quantity
as an argument of the
12.6.1. Other Shortcuts
Here are other command history shortcuts which may be useful to you:
"Bang, bang": Typing
"Bang number": Typing
the history file.
"Bang string": Typing
ing string from the history file.
[Up arrow] and [down arrow]: At the shell or GUI terminal prompt, you can press the up arrow
to move back through previous commands in your history list (the down arrow moves you for-
ward through the commands) until you find the command you want. Press [Enter] to execute the
command, just as if you had typed it on the command line.
12.7. Keep
Output from Scrolling
ls
Whenever I type
I can barely see the output of the directory because it scrolls by too quickly. How
ls
can I actually read the output?
To prevent the output of
. You are then able to see the output one screen at at time.
more
To read the contents of
ls -al /etc | less
To move forward a screen, press [Space] bar; to move back a screen, press the [b] key; to quit, press
[q].
You can achieve the same results with
12.7.1. Printing ls Output
You can also print directory listings by piping the output to a printer in the same way that you piped
the output to your screen. If you have configured a printer, type the following to pipe the output of a
command to the printer:
ls -al /etc | lpr
command).
history
(called "bang bang") executes the last command in the history.
!!
(as in
!number
(as in
!string
from scrolling by too quickly, pipe the output to a utility such as
ls
with
, type the following command at the shell prompt:
/etc
less
more
) executes the command which is numbered 302 in
!302
) executes a command with the most recent match-
!rpm
, another paging utility.
111
or
less

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents