Aliases

Aliases allow short names to be given to commands or command sequences. Invoking the alias name is equivalent to invoking the corresponding commands. To create or display alias definitions, or to remove aliases, use the following commands:

alias name definition     Define alias name
alias name                Display definition for alias name
alias                     Display all alias definitions
unalias name              Remove alias name
unalias *                 Remove all aliases

If a definition contains special characters, it should be quoted.

When you invoke an alias, any arguments are added to the end of the command to which the alias expands. To place arguments at a specific location within the command, use one of the following sequences in the alias definition.

Sequence

Description

\!*

All arguments

\!^

First argument

\!$

Last argument

\!:n

Argument n

Get Using csh & tcsh 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.