scp command-cross-server remote copy file command

scp [email protected]:/opt/soft/nginx-0.5.38.tar.gz /opt/soft/

1: Copy files from a remote place to a local directory. Download the nginx-0.5.38.tar.gz file from the /opt/soft/ directory on the 192.168.120.204 machine to the local /opt/soft/ directory

scp -r [email protected]:/opt/soft/mongodb /opt/soft/

2: Copy the directory from a remote place to the local. Download the mongodb directory from /opt/soft/ on the 192.168.120.204 machine to the local /opt/soft/ directory.

scp /opt/soft/nginx-0.5.38.tar.gz [email protected]:/opt/soft/scptest

3: Upload local files to the specified directory of the remote machine. Copy the file nginx-0.5.38.tar.gz in the local opt/soft/ directory to the opt/soft/scptest directory of the remote machine 192.168.120.204

scp -r /opt/soft/mongodb [email protected]:/opt/soft/scptest

4: Upload the local directory to the designated directory of the remote machine.

Guess you like

Origin blog.csdn.net/u011939633/article/details/86791632