Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Transfer files run in SCP background under Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Sometimes the files we need to copy by SCP are so large that we can't wait all the time, so how do we make SCP run in the background?

Here is a simple method:

1. Run SCP command

[root@test dpdir] # nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradir

2. Enter the password

Nohup: appending output to nohup.out

Oracle@ 192.168. 1.133s password:

At this time, the process of entering the password will be suspended, or will it run in the foreground?

3. Enter the ctrl+z pause program

The following prompt appears:

[1] + Stopped nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradir

4. Execute bg to keep the process running in the background

[root@test dpdir] # bg

[1] + nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradir &

[root@test dpdir] #

This 4 steps will enable SCP to run in the background and be done.

The output log of the whole process is like this, for reference only.

Operation log for reference!

[root@test dpdir] # nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradirnohup: appending output to nohup.outoracle@192.168.1.133's password: [1] + Stopped nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradir [root@test dpdir] # [root@test dpdir] # bg [1] + nohup scp OUTDB_ERR??.dmp oracle@192.168.1.133:/oradir & [root@test dpdir] #

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report