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`命令查看完整的输出日志。
-
查看文件的最后 10 行内容:
tail file.txt
-
查看文件的最后 20 行内容:
tail -n 20 file.txt
-
持续查看文件的最新内容:
tail -f file.txt
-
输出文件的最后 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