SCP command Go

Source: Internet
Author: User
Tags ftp client scp command

SVN Delete all the. svn files find.-name. Svn-type D-exec RM-fr {} \;Name: CP usage Rights: All user use: CP [options] source destcp [options] Source ... directory Description: Copy one file to another file or copy several files to another directory. The meter-A as far as possible file status, permissions and other information are reproduced as original. -R If the source contains a directory name, the files under the directory are also copied to the destination. -F If a destination already has a file with the same file name, it should be deleted before copying. Example: Copy the archive AAA (already present) and name it BBB:CP AAA BBB to copy all C programs to the finished subdirectory: CP*. C finished command: SCP between different Linux copy files are commonly used in 3 ways: The first is FTP, that is, one of the Linux installation FTP Server, so that you can use another FTP client program to copy files. The second method is to use Samba services, similar to the Windows file copy method to operate, relatively simple and convenient.    The third is the use of SCP commands for file replication. SCP is a file copy with security, SSH-based login. Easy to operate, for example, to copy the current file to a remote other host, you can command the following. SCP/home/daisy/full.tar.gz [email protected]172.19.2.75:/home/Root will then prompt you to enter the other 172.19.2. 75 The login password of the root user of the host, and then the copy is started. It is also easy to copy files from the remote host to the current system if you want to do this in reverse. CP of Linux/SCP Command +SCP command Details (GO)-Linmaogan-Single wood ★ No forest SCP [email protected]/full.tar.gz172.19.2.75:/home/root/full.tar.gz home/daisy/full.tar.gz Linux's SCP commands can be used to copy files and directories between Linux;==================SCP Command==================SCP can copy files between 2 Linux hosts; command basic format: SCP [optional parameters] File_source file_target======copy from local to remote====== *To copy a file:*command format: SCP local_file [email protected]_ip:remote_folder or SCP Local_                 file [email protected]_ip:remote_file or SCP local_file remote_ip:remote_folder Or SCP local_file remote_ip:remote_file 1th, 2 Specify the user name, the command executes after the password is entered, the 1th only specifies the remote directory, the file name does not change , the 2nd specifies the file name, the 3rd, 4 does not specify the user name, the command executes after entering the user name and password, 3rd only specifies the remote directory, the file name is unchanged, 4th specified the file name;*Example: SCP/home/space/music/1. mp3 [Email protected]:/home/root/others/Music SCP/home/space/music/1. mp3 [Email protected]:/home/root/others/music/001. mp3 SCP/home/space/music/1. mp3 www.cumt.edu.cn:/home/root/others/Music SCP/home/space/music/1. mp3 www.cumt.edu.cn:/home/root/others/music/001. mp3*To copy a directory:*command format: SCP-r local_folder [email protected]_ip:remote_folder or SCP-R local_folder Remote_ip:remote_folder A user name is specified in the 1th, the command needs to enter the password after execution, and the 2nd does not specify a user name, the command needs to enter the user name after execution and password;*Example: SCP-r/home/space/music/[Email protected]:/home/root/others/SCP-r/home/space/music/www.cumt.edu.cn:/home/root/others/The above command copies the local music directory to the remote others directory, which is remotely available after replication./others/music/Catalogue======copy from remote to local======from remote Copy to local, as long as the following 2 parameters are copied from the local copy to the remote command; for example: SCP [email protected]:/home/root/others/music/home/space/music/1. mp3 SCP-R www.cumt.edu.cn:/home/root/others//home/space/music/The simplest applications are as follows: SCP local user name @IP address: file name1Remote User name @IP address: file name2[Local User name @IP address:] Can not be entered, you may need to enter the password for the remote user name. Several parameters that may be useful:-V and most of the Linux commands-v means to show progress. Can be used to view connections, authentication, or configuration errors.-C Enable compression option.-P Select the port. Notep has been used by RCP.-4forcibly use the IPV4 address.-6forcibly use the IPV6 address. Note Two points:1If the remote server firewall has special restrictions, the SCP has to take the special port, depending on what port, depending on the situation, the command format is as follows: #scp-P4588[Email protected]:/usr/local/sin.sh/home/Administrator2. Use SCP be aware that the user you are using has permission to read the appropriate files for the remote server

SCP command Go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.