我试图通过nohup运行python脚本,并调用它的完整路径抛出no such file or directory
。你知道吗
示例:
nohup python3 ./script.py
作品
nohup python3 /full/path/to/file/script.py
不起作用。你知道吗
cat nohup.out
Python: can't open file '/full/path/to/file/script.py':
[Errno 2] No such file or directory
如果我给出了完整路径,为什么nohup
找不到文件,但是如果我在目录中,为什么找不到?你知道吗
它也在绝对路径中工作。下面是一个例子。你知道吗
我通过python脚本打印Linux服务器时间,其中包含绝对路径和相对路径。你知道吗
相关问题 更多 >
编程相关推荐