Useful Navigation Tips
So far in this chapter, I've covered just the basic commands and some simple command-line interaction. This section presents a few easy-to-understand tips to help you get around the command line.
The command-line interface on Move is configured to remember everything you type in. To bring up the command-line history, just press the up arrow on your keyboard. This shows you the most recent command you typed in. Each additional press of the up arrow shows you the next oldest command in your history, and each press of the down arrow displays the next most recent command. The bash history is usually configured to store the 500 most recently used commands.
One obvious use of this history is to correct a command that you
typed incorrectly. For example, suppose you wanted to run the
date
command, which displays the current date and
time on the system. But instead of typing date
,
you typed dat
instead:
[jharris@localhost jharris]$ dat
bash: dat: command not found
As you can see, the dat
command
doesn't exist (or it can't be
found). Now, press the up arrow to bring up the command you just
typed and add the missing e
:
[jharris@localhost jharris]$ date
Thu Dec 9 18:29:26 EDT 2004
Another useful feature in Linux is called
command-line
completion. When you type the first few letters of a
command and then press Tab, the computer attempts to display any
single command that matches what you type. Try this out by typing
dat
at the command prompt and then pressing Tab. Linux completes ...
Get Test Driving Linux now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.