Linux using aliases

Using aliases

linux in order to use part of many parameters, and complicated. If you are viewing the log and the like, particularly those who also log path length. linux offers an alias, use the alias command to replace complex, easier to use.

View aliases

Alias ​​View alias command.

[root@localhost ~]# alias
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias mv='mv -i'
alias rm='rm -i'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
[root@localhost ~]# 

Set the alias

[root@localhost ~]# alias cp='cp -i'

Cancel alias

[root@localhost ~]# unalias cp
Published 233 original articles · won praise 189 · views 390 000 +

Guess you like

Origin blog.csdn.net/sinat_32366329/article/details/104081751