Because the copied file is too large to open the shell all the time, let the SCP background run

Source: Internet
Author: User
Tags scp command

Original address: http://blog.itpub.net/90618/viewspace-750822/

1: Open a terminal, after the SCP command runs, enter a password to copy it

# SCP chris@221.179.1.65:/data/backup/eas_act_pay_sys.sql.gz./

--Enter password

eas_act_pay_sys.sql.gz 3% 52MB 42.0kb/s 8:30:01 ETAeas_act_pay_sys.sql.gz 16% 212MB 64.3kb/s

2: Open another terminal, log in with root

# ps-a


PID TTY Time CMD
19917 pts/1 00:00:01 SCP--scp PID, the following kill will use the
19918 pts/1 00:00:05 SSH
20372 PTS/2 00:00:00 PS

3: Stop SCP Run
# Kill-stop 19917

4: Go back to the first terminal to view, found to have stopped

[1]+ Stopped scp-p22 [email protected]:/data/backup/eas_act_pay_sys.sql.gz./

# BG
[1]+ scp-p22 [email protected]:/data/backup/eas_act_pay_sys.sql.gz./&--[1] codenamed 1

5: Enable SCP to run in the background:
# bg 1
-bash:bg:job 1 already in background

6: Check that SCP is running in the background:
# jobs
[1]+ Running scp-p22 [email protected]:/data/backup/eas_act_pay_sys.sql.gz./&

If you want to transfer the SCP to the foreground, use FG 1

Because the copied file is too large to open the shell all the time, let the SCP background run

Related Article

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.