为什么“ nohup git克隆”的输出的重定向不转移写入文本文件?

发布于 2025-02-04 03:30:54 字数 479 浏览 3 评论 0 原文

$ > nohup git clone https://github.com/arepo.git >nohup.txt &
$ > tail -F nohup.txt
nohup: ignoring input
Cloning into 'arepo'...

为什么当我使用 nohup 时,为什么(输出到bash输出时)的输出消失了?

相关但与:

$ > nohup git clone https://github.com/arepo.git >nohup.txt &
$ > tail -F nohup.txt
nohup: ignoring input
Cloning into 'arepo'...

Why do the outputs that normally follow (when outputting to bash) disappear when I use nohup?

Related, but separate from:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事↓在人 2025-02-11 03:30:54

使用 - progress 选项类似:

nohup git clone --progress https://github.com/arepo.git >nohup.txt &

显然,除非设置此选项:

Use the --progress option like:

nohup git clone --progress https://github.com/arepo.git >nohup.txt &

Apparently, the progress status is only reported when attached to a terminal unless you set this option:
https://www.git-scm.com/docs/git-clone#Documentation/git-clone.txt---progress

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文