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