Command line mode using FTP combat exercises

  
        

Assuming an FTP server, FTP server: qint.ithot.net, username: username password: user1234. Create a folder "qint" on the local computer D: drive. Copy the file to be uploaded to d:qint. The file is uploaded locally from the FTP command. The steps to download from the server are as follows:

1.“Start”-“Run”-Enter“FTP”

2.open The qint.ithot.net/* step can be merged with the first step, and directly enter "ftp qint.ithot.net" in "Run". If your FTP server is not using the 21 default port, if the port is 2121, then the command for this step should be followed by a space of 2121, that is, "open qint.ithot.net 2121"; */

3. Username/* prompts you to enter the username */

4.user1234/* prompts you to enter the password, the password does not echo, after you finish the password, press Enter. If your password is entered incorrectly, you will not be prompted to re-enter. At this point you have to type the "user” command, the third step will appear, you can re-enter the username and password. */

5.dir/* After you have successfully logged in, you can use the dir view command to view the files and directories in the FTP server. You can only view the files with the ls command. */

6.mkdir qint/*Creates a qint directory in the root directory of the FTP server. */

7.cd qint/*Enter the directory qint, use “cd your directory name” to enter the next level of the current directory, which is the same as DOS. */

8.bin/* uses binary transfer. If you want to upload and download, this step is very important. Without first executing this command, uploading and downloading will be slow. */

9.lcd d:qint/*Locate the local default folder, which I created in advance on the D: drive. */

10.!dir/*View files and directories in the local folder*/

11.put i001.jpg/*Files in the current directory (d:qint) I001.jpg is uploaded to the default directory of the FTP server. You can upload all files to the FTP server with "mput *.*". */

12.get d123.jpg/*Download the file d123.jpg in the default directory of the FTP server to the current directory (d:qint). You can use "mget *.*" to download all files to d:qint*/

13.delete *.*/* to delete all files in the directory qint. */

14.cd ../*Return to the previous directory, which is the root directory. Return to the previous directory with “cd ..” Note that there are spaces in the middle. Return to the root directory with “cd ”. */

15.rmdir qint/* Delete the directory qint. Delete the directory, there can be no files and directories in this directory, otherwise it will not be deleted. */

16.bye/*Exit the FTP server*/

When uploading and downloading, pay special attention to the current directory of the server and the local computer. Where is the file from? Check the current directory command of the FTP server as pwd. You can use the cd command to locate the server directory. You can use the lcd command to locate the directory of your local computer. The above example is applied to the most commonly used commands for uploading and downloading using the FTP command line. You can also use the command “? ” See more commands.



Copyright © Windows knowledge All Rights Reserved