SCP Background Executive Overview

Source: Internet
Author: User

We often send files from server A to Server B, but sometimes when we execute the command with Putty, the file passes a part, the Putty terminal closes, and the file is not fully transmitted.

Here's a workaround to get the SCP command to execute in the background.

Using the Nohup command

Shell Code

$nohup SCP file_to_copy user@server:/path/to/copy/the/file > Nohup.out 2>&1

This is not running in the background, you need to enter a password,

Then press Ctr+z to suspend the order,

And then use the BG command.

Shell Code

Bg

This time, even if you close the putty, the SCP still runs in the background until it is finished.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/zs/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.