I installed Linux on a virtual machine, and the real system was Windows XP. in Windows XP, I used Serv-u software to set up an FTP server, then we can log on to the FTP server in the virtual machine's Linux to download or upload files. The difference is that in Linux, the FTP command is entered in the command line, there should also be Linux-specific software such as FlashFXP and CuteFTP. However, if I do not know it, I will not miss it.
A Brief Introduction to the FTP commands in Linux:
1. Connect to the FTP server
Format: ftp hostname or ip-address
A)In the linux Command Line, enter the IP address or Host Name of the server to be set up: ftp 10.60.48.195
B)The server asks you for your username and password. after entering the password, you can wait for the authentication to pass. Note: When you enter the password, the input is not displayed on the terminal, and it is always blank. So if you are sure that the input is correct, press Enter.
2. Download an object
The get and mget commands are usually used to download files. get is used for a single file, while mget is used for multiple files.
A)Get
Format: get file name to be downloaded saved to the local file name
To obtain D: \ pic \ logo.jpg on the server, enter the following command:
Get/pic/logo.jpg face.jpg
In this example, the logo.jpg file on the server is downloaded to the local machine and renamed face.jpg ".
B)Mget
Format: batch files to be downloaded by mget
To download all files under D: \ pic \ on the server, enter the following command:
Cd/pic
Mget *.*
Note: All downloaded files are saved to the current directory of the Linux host. For example, if you run the ftp command under/root/moqingwen, all files are downloaded to/root/moqingwen.
3. upload files
The put and mput commands are usually used to upload files. put is used for a single file, while mput is used for multiple files.
A)Put
Format: put local files to be uploaded are saved to files on the server.
To upload your logo.jpg file to the server E: \ PICAND rename it face.jpg
Put logo.jpg/pic/face.jpg
B)Mput
Format: mput local batch file to be uploaded
To upload all jpg files in the local directory to the server E: \ pic
Cd/rose
Mput *. jpg
Note: All uploaded files are from the current directory of the Linux host. For example, if you run the ftp command under/root/moqingwen, only files under/root/moqingwen will be uploaded to the server.
4. Disconnect
Bye: the connection to the server is interrupted.
Format: bye
Although they are all very simple, they are very practical.
Related Articles]
- Complete WU-FTP server configuration in Linux environment
- Use Tftp to boot Debian from the network for system installation
- Use CesarFTP to set up an FTP server in five minutes