1. Copy files between linux system and win system
1.1 SFTP commands
When no file system is attempted, the SFPT command needs to be used to transfer files between the win and linux systems. The required commands are explained as follows.
cd directory 切换linux系统目录;
lcd directory switch the win system directory;
get fileName copies linux files to win;
put fileName copies the win file to linux;
(Fig. 1)
(Fig. 2)
2. Copy files between linux systems
There are two commands ftp and scp for file upload and download in liunx system
2.1 ftp command (omitted)
The following conditions must be met to use ftp. The server has ftp Server installed, and another linux can use the ftp client program to copy, read and download files.
2.2 scp command
scp is a secure file copy, ssh-based login.
Example 1: Upload the file in the /opt/xinwen/tomcat/webapps/studyTimes directory of the local computer and upload it to the /opt/xinwen/tomcat/webapps/studyTimes directory of 119.29.66.226, enter the command and press Enter, and then the system prompts to enter the password of 226
scp -r /opt/xinwen/tomcat/webapps/studyTimes [email protected]:/opt/xinwen/tomcat/webapps/studyTimes
Example 2: Download 119.29.66.226, /opt/xinwen/fileBackup/studyTimes directory to the current directory of the machine, enter the command and press Enter, and prompt to enter the 226 password
scp -r [email protected]:/opt/xinwen/fileBackup/studyTimes ./