Scp commands for Linux learning and XCOPY commands for Windows
1. Basic Concepts scp commands are used to transmit data between Linux and Linux Hosts. Simply put, a linux host can transmit files from another linux host through scp commands. The XCOPY command is used for data transmission between Windows and Windows hosts. 2. Basic command format: scp [optional parameter] file_source file_target may have several useful parameters:-v is the same as-v in most linux commands and is used to display the progress. it can be used to view connections, authentication, or configuration errors. -C enable compression options. -P: select the port. note:-p has been used by rcp. -4 Use the IPV4 address forcibly. -6 Use IPV6 addresses forcibly. -r folder recursive Replication
3. Example local to remote: 1) scp local_file remote_username @ remote_ip: remote_folder eg. scp/home/space/music/1.mp3 root@www.cumt.edu.cn:/home/root/others/music 2) scp local_file remote_username @ remote_ip: remote_file eg. scp/home/space/music/1.mp3 root@www.cumt.edu.cn:/home/root/others/music/001.mp3 3) scp local_file remote_ip: remote_folder eg. scp/home/space/music/1.mp3 www.cumt.edu.cn:/home/root/others/music 4) scp local_file remote_ip: remote_file remote to local: [the next two parameters of the tuning] scp root@www.cumt.edu.cn: /home/root/others/music/home/space/music/1.mp3 scp-r www.cumt.edu.cn:/home/root/others/home/space/music/scp-rv ubuntu@10.75.95.210: /home/ubuntu/zhangmin/GB7x27A/app /. note: 1. if the remote server firewall has special restrictions, scp will go through the special port, the specific port depends on the situation, the command format is as follows: # scp-p 4588 remote@www.abc.com: /usr/local/sin. sh/home/administrator 2. when using scp, pay attention to whether the user used You have the permission to read the corresponding files on the remote server. Between windows and windows: XCOPY "\ 10.94.159.11 \ Administrator \ mydir" D: \ whu_zhangmin \ linux \ study \