当前位置:首页 > 编程笔记 > 正文
已解决

服务器基本命令

来自网友在路上 139839提问 提问时间:2023-11-02 01:18:29阅读次数: 39

最佳答案 问答题库398位专家为你答疑解惑

nohup python3 ./download-all-2023-11-01_12-08-11.py > T85_download.log &

标准输出重定向到文件

nohup bash test.sh > stdout.txt &

标准错误输出重定向到文件

nohup bash test.sh 2> stderr.txt &

重定向到不同文件

nohup bash test.sh > stdout.txt 2> stderr.txt &

1.使用`ps -ef | grep nohup`命令查看nohup进程的详细信息

2.使用`tail -f nohup.out`命令查看nohup进程的输出日志文件,也可以自己的.log文件 

tail -f T85_download.log

3.如果nohup进程已经结束,可以使用`cat nohup.out`命令查看完整的输出日志。

  1. 查看文件的最后 10 行内容:

    tail file.txt

  2. 查看文件的最后 20 行内容:

    tail -n 20 file.txt

  3. 持续查看文件的最新内容:

    tail -f file.txt

  4. 输出文件的最后 100 个字节内容:

    tail -c 100 file.txt

top -c 查看cpu应用进程

ls -a 查看隐藏的文件

ssh xinw@114.214

scp /home/wx/HMF_Sentinel1_data/T85/download-all-2023-11-01_12-08-11.py xinw@114.214:/data2/xinw/HMF_Sentinel1_data/T85

查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"服务器基本命令":http://eshow365.cn/6-29766-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!