488889
217
Zoom out
Zoom in
Previous page
1/284
Next page
17.6 Useful Features of the Shell
As you probably noticed in the examples above, entering commands in Bash can
include a lot of typing. In the following, get to know some features of the Bash that
can make your work a lot easier and save a lot of typing.
History
By default, Bash remembers” commands you have entered. This feature is called
history. You can browse through commands that have been entered before, select
one you want to repeat and then execute it again. To do so, press [] repeatedly
until the desired command appears at the prompt. To move forward through the
list of previously entered commands, press []. For easier repetition of a certain
command from Bash history, just type the rst letter of the command you want
to repeat and press [Page ].
You can now edit the selected command (for example, change the name of a le
or a path), before you execute the command by pressing [Enter]. To edit the
command line, just move the cursor to the desired position using the arrow keys
and start typing.
You can also search for a certain command in the history. Press [Ctrl] + [R] to
start an incremental search function. showing the following prompt:
(reverse-i-search)`':
Just type one or several letters from the command you are searching for. Each
character you enter narrows down the search. The corresponding search result
is shown on the right side of the colon whereas your input appears on the left of
the colon. To accept a search result, press [Esc]. The prompt now changes to its
normal appearance and shows the command you chose. You can now edit the
command or directly execute it by pressing [Enter].
Completion
Completing a lename or directory name to its full length after typing its rst
letters is another helpful feature of Bash. To do so, type the rst letters then press
[→|] (Tabulator). If the lename or path can be uniquely identied, it is completed
at once and the cursor moves to the end of the lename. You can then enter the
next option of the command, if necessary. If the lename or path cannot be
uniquely identied (because there are several lenames starting with the same
letters), the lename or path is only completed up to the point where it becomes
ambiguous again. You can then obtain a list of them by pressing [→|] a second
time. After this, you can enter the next letters of the le or path then try comple-
tion again by pressing [→|]. When completing lenames and paths with the help
of [→|], you can simultaneously check whether the le or path you want to enter
really exists (and you can be sure of getting the spelling right).
Wild Cards
You can replace one or more characters in a lename with a wild card for path-
name expansion. Wild cards are characters that can stand for other characters.
There are three dierent types of these in Bash:
Shell Basics 205
217


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Suse openSUSE 12.2 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Suse openSUSE 12.2 in the language / languages: English as an attachment in your email.

The manual is 14 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

Others manual(s) of Suse openSUSE 12.2

Suse openSUSE 12.2 User Manual - English - 530 pages


The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info