Alias (command) - Creating Aliases

Creating Aliases

Aliases can be created by supplying name/value pairs as arguments for the alias command. An example of the Bash shell syntax is:

alias copy="cp"

The corresponding syntax in the C shell or tcsh shell is:

alias copy "cp"

This alias means that when the command copy is read in the shell, it will be replaced with cp and that command will be executed instead.

In the 4DOS/4NT shell the following syntax is used to define cp as an alias for the 4DOS copy command:

alias cp copy

To create a new alias in Windows PowerShell, the new verb can be used with the alias cmdlet:

new-alias ci copy-item

This creates a new alias called ci that will be replaced with the copy-item cmdlet when executed.

Read more about this topic:  Alias (command)

Famous quotes containing the word creating:

    The next generation of women will enter a world in which they are perceived to have more opportunities for creating fulfilling lives than women have ever had before.
    Elizabeth Debold (20th century)