zoukankan      html  css  js  c++  java
  • Linux命令之命令别名

    对于经常执行的较长的命令,可以将其定义成较短的别名,以方便执行

    显示当前shell进程所有可用的命令别名

    [04:33:43 root@C8[ ~]#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; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
    alias xzegrep='xzegrep --color=auto'
    alias xzfgrep='xzfgrep --color=auto'
    alias xzgrep='xzgrep --color=auto'
    alias zegrep='zegrep --color=auto'
    alias zfgrep='zfgrep --color=auto'
    alias zgrep='zgrep --color=auto'
    

    定义别名NAME,其相当于执行命令VALUE
    范例:
    撤消别名:unalias
    注意:在命令行中定义的别名,仅对当前shell进程有效
    如果想永久有效,要定义在配置文件中
    仅对当前用户:~/.bashrc
    对所有用户有效:/etc/bashrc
    编辑配置给出的新配置不会立即生效,bash进程重新读取配置文件
    如果别名同原命令同名,如果要执行原命令,可使用

    * * * 胖并快乐着的死肥宅 * * *
  • 相关阅读:
    npm
    模块化开发
    Html input 标签
    H5 移动端布局
    Mysql指令
    php面向对象
    git指令
    css3 属性
    如何渲染数据
    angular 服务
  • 原文地址:https://www.cnblogs.com/bpzblog/p/12617152.html
Copyright © 2011-2022 走看看