|
Metacharacters are keyboard characters with
special meaning to the shell. They are a powerful feature of any shell.
A general definition of a metacharacter is any keyboard character that
is not alphanumeric. Metacharacters are used with many UNIX commands to
provide greater flexibility. Some of the metacharacters used with UNIX
are similar in function to those used with DOS. The asterisk (*) and the
question mark (?) are metacharacters which are also known as wildcards
and are used to work with groups of files efficiently.
The Figure shows some of the more common metacharacters and a
brief description of their primary function.
It is very important not to use
metacharacters when naming files and directories. The dot (.) and
underscore (_) are the only two non-alphanumeric characters that are not
metacharacters. This is why you can use the dot (.) and the underscore
(_) in file names. A hyphen (-), even though it is a metacharacter (used
to delineate options in a command line), can also be used in file names.
|