Linux 后台执行 SCP

有的时候我们需要SCP拷贝的文件很大,不能一直等着,那如何使SCP可以在后台运行呢?
下面介绍一个简单的方法,4步可以使SCP在后台运行:

1. 运行SCP命令

shell> nohup scp test.tar.gz [email protected]:/home

2. 输入密码

nohup: appending output to nohup.out
[email protected]'s password: 

此时输完密码进程会挂起,还是在前台运行

3. 输入ctrl+z暂停程序

会出现如下提示:

[1]+  Stopped                 nohup scp test.tar [email protected]:/home

4. 输入 bg 使进程在后台继续运行

shell> bg
[1]+  nohup scp test.tar [email protected]:/home &

你可能感兴趣的:(Linux 后台执行 SCP)