Practice using FTP through command line

Source: Internet
Author: User

Assume that there is an FTP server, the FTP server: qint.ithot.net, And the username and password: user1234. Create a folder "qint" on the Local Computer D: disk ". Copy the file to d: qint. Use the FTP command to upload files from the local device. The steps for downloading files from the server are as follows:

1. "Start"-"run"-Enter "FTP"

2. open qint.ithot.net
/* This step can be combined with Step 1. In "run", enter "ftp qint.ithot.net" directly ". If your FTP server is not using the default port 21, if the port is 2121, then the command in this step should be followed by a space of 2121, that is, "open qint.ithot.net 2121 "*/

3. username
/* Prompt you to enter the user name */

4. user1234
/* You are prompted to enter the password. If the password is not displayed, press enter after the password is closed. If your password is incorrect, you will not be prompted to re-enter the password. If you want to enter the "user" command, step 3 will appear. You can re-enter the user name and password. */

5. dir
/* After you log on to the FTP server, you can use the dir command to view the files and directories on the FTP server. You can use the ls command to view only the files. */

6. mkdir qint
/* Create a qint directory under the root directory on the FTP server. */

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

8. bin
/* Uses binary transmission. If you want to upload and download, this step is very important. If you do not execute this command first, the upload and download will be very slow. */

9. LCD d: qint
/* Locate the local default folder, which was created on D: disk in advance. */

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

11. put i001.jpg
/* Upload the i001.jpg file in the current directory (d: qint.pdf) to the default directory on the FTP server. You can use "mput *. *" to upload all files to the FTP server. */

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

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

14. cd ..
/* Return to the upper-level directory, that is, the root directory. Return to the upper-level directory and use "cd...". Note that there are spaces in the middle. Use "cd" to return the root directory ". */

15. rmdir qint
/* Delete the directory qint. Delete A directory. Files And Directories cannot be deleted. */

16. bye
/* Exit the FTP server */

When uploading and downloading files, pay special attention to the current directory of the server and local computer, where the files are located. View the current directory command of the FTP server as pwd. You can use the cd command to locate the directory of the server. You can use LCD commands to locate the directory of the local computer. The above example applies the most common commands for uploading and downloading via FTP command line. You can also use the command "?" View more commands.

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.