Linux remote copy and local copy commands

Linux remote copy and local copy commands

1. Linux to Linux remote copy scp command

scp file name root@remote ip:/path/

Copy the test.tar file in the local home directory to /home/adm on the remote host 192.168.1.23 In the / directory, the command is: scp /home/test.tar [email protected]:/home/adm/ Enter the password after pressing Enter.

scp provides several options. Just add it after scp

    -p Copy the file The time when the source file was created is preserved.
    -q Do not display any prompt messages when performing a file copy.
    -r Copy the entire directory www.2cto.com 
    -v Display a prompt when copying files.

Remote copy folder port number
scp -P 8022 [email protected]:/temp/file1.tmp /my/tmp

Remote copy folder port number folder
scp -P 8022 -r [email protected]:/temp/file1. tmp /my/tmp

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326972668&siteId=291194637