首页 Shell命令记录
文章
取消

Shell命令记录

1、shell结果赋值变量

pwd 的输出被赋给变量 currPath,打印currPath,创建bin目录

1
2
3
currPath=$(pwd)$ currPath=`pwd`
echo $currPath
mkdir $currPath/bin

2、根据pid查询Jar位置

1、使用命令查询pid 2、根据pid查询jar路径

1
2
ps -ef|grep java
ll /proc/$pid/cwd
本文由作者按照 CC BY 4.0 进行授权