当前位置:网站首页>【nohup】nohup命令的简单使用
【nohup】nohup命令的简单使用
2022-08-03 05:27:00 【寻找永不遗憾】
1 nohup时
执行下方命令后,将 标准输出(1,默认可不写)、错误信息(2) 写入到 output.log 文件中。
nohup python train.py >output.log 2>&1 &
nohup hb_mapper makertbin -c xx.yaml --model-type onnx 2>&1 &
nohup sh build_efficientnet.sh >efficientnet.log 2>&1 &
最后那个&
的作用:
- 能进行输入操作(比如输入命令、换行、打空格等),可进行交互 输入和输出的操作。
- 关闭客户端后命令仍然会运行。
更详细的解读参考链接:
https://blog.csdn.net/xiaojin21cen/article/details/88991768
2 nohup后
查看正在运行的后台进程:
jobs -l
jobs命令只能看运行nohup命令的终端没关时,关闭终端后,在另一个终端使用jobs就无法看到后台跑的程序了,此时利用ps
ps -ef
结合grep使用会更好,例如ps -ef | grep makertbin
边栏推荐
猜你喜欢
随机推荐
contos install php-ffmpeg and tp5.1 using plugin
ESXI中损坏虚拟机数据如何找回
JumpServer如何传输文件以及复制剪切板
【面筋1】一些没什么标准答案的问题
内网渗透信息收集
go test执行多个文件夹下相同目录的用例
【C语言】输出100~200之间的素数/质数(3种方法)
【入职第一篇知识总结- Prometheus】
二分查找6 - 寻找峰值
Oracle 11g静默安装
在OracleLinux8.6的Zabbix6.0中监控Oracle11gR2
小程序动态加载分包文件及根路径处理
ORM框架:Dapper的使用
Use of Alibaba Cloud SMS Service (create, test notes)
Automatic ticket issuance based on direct reduction of China Southern Airlines app
Difference between @JsonProperty and JSONField?
2021-06-15
802.1AS 时钟同步原理理解
嘿!selenium自动下载driver版本,得知道一下
TFS (Azure conversation) prohibit people checked out at the same time