Aliases allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the alias and unalias builtin commands.
You probably have set some personnal alias or function on your box. Most common is probably dir, ls, ll… If you forgot how you define your alias or function, the easiest way for get back the definition isn’t to read your numerous .bashrc but using some bash built-in command : type or command.
type: usage: type [-afptP] name [name ...]
command: usage: command [-pVv] command [arg ...]
Command is generally used for running command with arguments ignoring any shell function named command. Instead of Type that describe a command, for each name, indicate how it would be interpreted if used as a command name. But both can be used, here is some examples :
nicolas@grimm:~$ type dir
dir possède l’alias `ls –color=auto –format=vertical’
nicolas@grimm:~$ command -v ls
alias ls=’ls –color=auto’
nicolas@grimm:~$ command -V ls
ls possède l’alias `ls –color=auto’
nicolas@grimm:~$ command -V dir
dir possède l’alias `ls –color=auto –format=vertical’
nicolas@grimm:~$ command -V rm
rm is /bin/rm
Enjoy ;-)















Recent Comments