->Title Page
-->File Structure
-->Online Manual
-->Basic Commands
-->Additional Commands
-->Login files
-->Special characters
--->Quote characters
-->Miscellaneous Tips
-->Things to try
->Vi editor
->Mirror sites
->Further reading

[ Up ]

Unix ---> Other special characters

If you have set the history history) option, you can use special characters to repeat previously entered commands without retyping them. Here are some of them:1

    !!          On a line by itself will repeat the
                most recent event.
    !com        Will repeat the most recent event
                that begins with "com".
    !?string    Will repeat the most recent event
                that contained "string".
    !-n         Will repeat the nth previous event.
    !n          Will repeat the nth event.  Type
                "history" to see the events numbered.
    ^old^new^   Will substitute "new" for the first
                occurrence of "old" in the most
                recent event, and repeats that event.
    :           Will select specific words from an
                event line so you can repeat parts
                of an event, e.g. 


                will substitute "eve" for "adam"
                and repeat the last event with
                "adam" in it.
The semicolon, ";", separates commands. Typing

    clear ; ls
is equivalent to typing each command on a separate command line.

The "&" symbol tells the shell to execute the command in the background. For example, typing xid & would execute XID in the background and give my Unix command line back so I could continue to use it even while XID was running.

The C shell also finds special meaning in the following:

    "  `  {  }  #
Rather than explain the uses of these special characters, I caution you to avoid using them in filenames.

Site Statistics

1 By event I mean one command line. This may be a single command, or it may include a number of commands in a pipeline, or whatever.

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor