
[
set
]
Matches one of the characters from the group specified inside the square brackets,
which is represented here by the string
set
. As part of
set
you can also specify
character classes using the syntax [:
class
:], where a class is one of
alnum
,
alpha
,
ascii
, etc.
Using
!
or
^
at the beginning of the group ([!
set
]) matches one character other
than those identified by
set
.
Assuming that your
test
directory contains the files
Testfile
,
Testfile1
,
Testfile2
, and
datafile
.
• The command
ls Testfile?
lists the files
Testfile1
and
Testfile2
.
• The command
ls Testfile?
lists the files
Testfile1
and
Testfile2
.
• With
ls Test*
, the list also includes
Testfile
.
• The command
ls *fil*
shows all the sample files.
• Use the
set
wild card to address all sample files whose last character is a number:
ls Testfile[1-9]
or, using classes,
ls Testfile[[:digit:]]
.
Of the four types of wild cards, the most inclusive one is the asterisk. It could be used
to copy all files contained in one directory to another one or to delete all files with one
command. The command
rm *fil*
, for instance, would delete all files in the current
directory whose name includes the string fil.
Viewing Files with Less and More
Linux includes two small programs for viewing text files directly in the shell:
less
and
more
. Rather than starting an editor to read a file like
Readme.txt
, simply enter
less Readme.txt
to display the text in the console window. Use
Space
to scroll
down one page. Use
Page Up
and
Page Down
to move forward or backward in the text.
To exit less, press
Q
.
Instead of less, you can also use the older program more. However, it is less convenient
because it does not allow you to scroll backwards.
340
Installation and Administration
Содержание LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 11-05-2007
Страница 1: ...SUSE Linux Enterprise Server www novell com 10 May 11 2007 Installation and Administration...
Страница 14: ......
Страница 19: ...Part I Deployment...
Страница 20: ......
Страница 60: ......
Страница 128: ......
Страница 243: ...Part II Administration...
Страница 244: ......
Страница 274: ......
Страница 312: ......
Страница 348: ......
Страница 380: ......
Страница 381: ...Part III System...
Страница 382: ......
Страница 438: ......
Страница 452: ......
Страница 478: ......
Страница 486: ......
Страница 498: ......
Страница 512: ......
Страница 558: ......
Страница 559: ...Part IV Services...
Страница 560: ......
Страница 652: ......
Страница 670: ......
Страница 742: ......
Страница 754: ......
Страница 796: ......
Страница 817: ...Part V Security...
Страница 818: ......
Страница 858: ......
Страница 886: ......
Страница 910: ......
Страница 911: ...Part VI Troubleshooting...
Страница 912: ......
Страница 924: ......