zoukankan      html  css  js  c++  java
  • 自定义系统命令缩写 分类: ubuntu 2013-07-15 17:42 344人阅读 评论(0) 收藏

    添加系统全局变量:

    步骤1:

    使用root用户登录,在家目录下修改.bash_profile文件,查看结果如下:

    [root@server132 ~]# more .bash_profile

    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    export PATH
    unset USERNAME
    alias p='ps -ef|grep java'
    alias rm='rm -i'
    alias so='su - oracle'
    alias sppd='/opt/jinrong/spider/bin/shutdown.sh'
    alias sptm='/opt/jinrong/tomcat/bin/shutdown.sh'
    alias stpd='/opt/xizang/spider/bin/startup.sh'
    alias sttm='/opt/xizang/tomcat/bin/startup.sh'
    alias tpd='tail -f /opt/jinrong/spider/logs/catalina.out'

    alias ttm='tail -f /opt/xizang/tomcat/logs/catalina.out'


    步骤2:

    source ~/.bash_profile

    关闭当前终端,重新打开终端,执行缩写命令即可

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    Word操作——通配符
    圆的拟合
    最优化案例整理
    机器学习数学基础知识备忘
    scikit-learn学习笔记
    Linux下安装scikit-learn
    ROS学习备忘
    [ROS]激光驱动安装
    CMake和Linux编程:find_package的使用
    [OpenCV]直线拟合
  • 原文地址:https://www.cnblogs.com/think1988/p/4628126.html
Copyright © 2011-2022 走看看