EADST

Linux Transfer File between Remote and Local

Example 1: Copy a file from a remote server location to a local PC or server directory

$scp root@10.1.2.123:/opt/soft/test.zip /opt/soft/
Note: Download the test.zip file from the /opt/soft/ directory on 10.1.2.123 to the /opt/soft/ directory

Example 2: Remote to local copy

$scp -r root@10.1.2.123:/opt/soft/test /opt/soft/
Note: Download the test directory from /opt/soft/ on 10.1.2.123 to the local /opt/soft/ directory.

Example 3: Upload a local file to a specified directory on a remote machine

$scp /opt/soft/test.zip root@10.1.2.123:/opt/soft/scptest
Copy the test.zip file in the /opt/soft/ directory on the local computer to the /opt/soft/scptest directory on the remote machine 10.1.2.123

Example 4: Upload a local directory to a specified directory on a remote machine

$scp -r /opt/soft/test root@10.1.2.123:/opt/soft/scptest
Note: Upload the local directory /opt/soft/test to the directory /opt/soft/scptest on the remote machine 10.1.2.123

相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文266篇,共被浏览440777

本站已经建立2019天!

热门文章
文章归档
回到顶部