![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
Andromeda
菜,别骂了
展开
-
Shell脚本判断进程是否存在,如果不存在则重新启动
#! /bin/bash# program : 判断进程是否存在,如果不存在则重新启动function check(){ count=`ps -ef |grep $1 |grep -v "进程关键字" |wc -l` #echo $count if [ 0 == $count ];then nohup python /runscript/wor...原创 2019-12-09 16:18:52 · 1804 阅读 · 0 评论 -
linux使用crontab定期清理 log文件
crontab 文件的格式:{minute} {hour} {day-of-month} {month} {day-of-week} {full-path-to-shell-script}o minute: 区间为 0 – 59o hour: 区间为0 – 23o day-of-month: 区间为0 – 31o month: 区间为1 – 12. 1 是1月. 12是12月.o Da...原创 2019-11-18 15:56:34 · 508 阅读 · 0 评论 -
Linux服务器部署项目总结
1.cd进入项目路径若为jar文件nohup java -jar xxxx.jar & (后台启动,输出nohup.out文件)java -jar xxxx.jar & (前台启动)若为py文件先 conda activate 虚拟环境再python main.py(前台启动,可ctrl C退出)若想要终止后台启动的进程先查询占用端口的进程ne...原创 2019-11-15 10:57:59 · 305 阅读 · 0 评论