Linux常用别名设置

Linux常用别名设置

1、maven打包:mi

echo "alias mi='mvn clean install -U -DskipTests'" >>~/.bash_profile

source ~/.bash_profile

使用:

mi

2、nohup后台运行jar包:runjar

cat >> ~/.bash_profile <<-'EOF'
alias runjar='func(){ nohup java -jar $1 >>./catalina.out 2>&1 & };func'
EOF

使配置生效:

source ~/.bash_profile

使用:

runjar xx.jar
原文地址:https://www.cnblogs.com/zhaoxxnbsp/p/13507946.html