Alias (command)
From FreeBSDwiki
(Difference between revisions)
(Speab about reading alias values) |
|||
Line 1: | Line 1: | ||
− | The [[alias]] command is used to create [[aliases]]. | + | The [[alias]] command is used to create [[aliases]], and to get a list of aliased commands. |
− | The syntax if shell dependant : | + | ==Aliases creaction== |
+ | |||
+ | The syntax if shell dependant: | ||
'''B-Shell''' ([[sh]], [[bash]]) : | '''B-Shell''' ([[sh]], [[bash]]) : | ||
Line 11: | Line 13: | ||
alias la 'ls -A' | alias la 'ls -A' | ||
− | See also: [[unalias]] | + | ==Aliases consultation== |
+ | |||
+ | You can use this to get an existing [[aliases]] list: | ||
+ | '''> alias''' | ||
+ | ...=../.. | ||
+ | ....=../../.. | ||
+ | .....=../../../.. | ||
+ | ......=../../../../.. | ||
+ | .......=../../../../../.. | ||
+ | clean='rm -f `find . -name "*~" -o -name ".*~" -o -name ".*.core" -o -name "*.core" -o -name "#*#" -o -name "a.out"` | ||
+ | close='cdcontrol -f /dev/cd0 close' | ||
+ | eject='cdcontrol -f /dev/cd0 eject' | ||
+ | fr='export LANG=fr_FR.ISO8859-15' | ||
+ | la='ls -a' | ||
+ | ll='ls -Al' | ||
+ | ls='ls -FG' | ||
+ | '''> alias ls''' | ||
+ | ls='ls -FG' | ||
+ | |||
+ | See also: [[unalias]], [[which]] | ||
[[Category : System Commands]] | [[Category : System Commands]] |
Revision as of 03:24, 13 July 2005
The alias command is used to create aliases, and to get a list of aliased commands.
Aliases creaction
The syntax if shell dependant:
alias l=ls alias la='ls -A'
alias l ls alias la 'ls -A'
Aliases consultation
You can use this to get an existing aliases list:
> alias ...=../.. ....=../../.. .....=../../../.. ......=../../../../.. .......=../../../../../.. clean='rm -f `find . -name "*~" -o -name ".*~" -o -name ".*.core" -o -name "*.core" -o -name "#*#" -o -name "a.out"` close='cdcontrol -f /dev/cd0 close' eject='cdcontrol -f /dev/cd0 eject' fr='export LANG=fr_FR.ISO8859-15' la='ls -a' ll='ls -Al' ls='ls -FG' > alias ls ls='ls -FG'