scp作为后台工作?

发布于 2024-12-28 17:34:43 字数 262 浏览 4 评论 0原文

问题是:

  1. 我必须将一些文件从一台主机移动到另一台主机,好吧,我使用 scp 它。
  2. 但我需要在不阻塞控制台的情况下使用它,所以应该使用 scp &。但我的工作会在断开连接后终止(听说这是一种称为 hup 信号的东西),所以我找到了一些解决此问题的技巧。
  3. 但我想在一段时间后看到进度条,所有这些技巧都不起作用,因为当我使用作业时 - 它显示仅适用于这些会话的作业。

那么如何解决我的问题呢? PS 抱歉我的英语。

Here is the problem:

  1. i must move some files from one host to another, ok i use scp for
    it.
  2. But i need use it without blocking console, so should use scp &. But my job will killed after disconnecting (a heard it`s something called hup signal) so i found some tricks for fixing this.
  3. But i wanna see progress bar after some time and all that tricks couldnt work because when i use jobs - it display jobs that only for these session.

So how to fix my problem ?
P.S. Sorry for my English.

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

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

发布评论

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

评论(2

2025-01-04 17:34:43

我不确定这是否是您想要的,但我建议 GNU Screen。它允许您运行程序,以便在您注销时,程序继续在后台执行。稍后您可以重新登录并恢复与该程序的交互。

I am not sure it is what you want but I'll suggest GNU Screen. It allows you to run a program so that when you log out, the program continues execution in the background. Later you can log back in and resume interaction with the program.

幽梦紫曦~ 2025-01-04 17:34:43

我想您希望能够分离并附加终端 -该工具称为屏幕。

I guess you want ability to detach -and- attach terminal - The tool is called screen.

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