编写一个脚本,以.sh结尾,内容如下:
cd /opt/geliang/
rm -rf s
mkdir s
cp -r /opt/cash-thrid-auth/cash-thrid-star/bin /opt/geliang/s //拷贝单个文件用cp就可以
cd /opt/geliang/s/
rm -rf conf
rm -rf dev
cp -r /opt/cash-thrid-auth/cash-thrid-star/conf/dev /opt/geliang/s/
mv /opt/geliang/s/dev /opt/geliang/s/conf //mv 既可以移动,也可以重命名,在这里就是重命名dev文件为conf
在notepad++中把格式改为unix格式,并且改为utf-8编码
如下面的图片:
![](https://img.haomeiwen.com/i7326953/65962efc551bd706.png)
![](https://img.haomeiwen.com/i7326953/8c69baab64b93aa4.png)
将文件保存后上传到系统目录下
然后执行,比如保存的名称为aa.sh,执行就用 sh aa.sh
sh aa.sh
网友评论