Recently wanted to download a Web site from the United States server, found that the speed of FTP is often 0.1k/seconds
My God, it's so slow. Google's agent is also not good to use. Use the agent on the link is not on.
Find a friend of the domestic multi-line room, it is fast a lot.
Linux FTP connection, use, all rely on the command line.
1. Connecting to an FTP server
Format: FTP [hostname| ip-address]
A) at the Linux command line, enter:
FTP 192.168.1.1
b The server asks you username and password, enter the username and the corresponding password respectively, wait for authentication to pass.
2. Download File www.111cn.net
The download file usually uses the get and mget two commands.
a) Get
Format: Get [Remote-file] [Local-file]
Transfers files from the remote host to the local host.
To obtain/usr/your/1.htm on a remote server, the
ftp> get/usr/your/1.htm 1.htm (carriage return)
b) mget
Format: mget [Remote-files]
Receives a batch of files from the remote host to the local host.
To get all the files under/usr/your/on the server,
Ftp> cd/usr/your/
ftp> mget *.* (carriage return)
Every time you download a file, you will be prompted. If you want to remove the hint, execute before mget the *.* command: Prompt off
Note: The files are downloaded to the Linux host's current directory. For example, the FTP command that runs under/usr/my, the files are downloaded to the/usr/my.
3. Upload file
a) put
Format: Put Local-file [Remote-file]
Transfers a local file to the remote host.
If you want to transfer the local 1.htm to the remote host/usr/your, and renamed to 2.htm
Ftp> put 1.htm/usr/your/2.htm (carriage return)
b) mput
Format: Mput local-files
Transfers a batch of files from a local host to a remote host.
To upload all HTML files in the local current directory to the server/usr/your/
Ftp> Cd/usr/your (carriage return)
ftp> mput *.htm (carriage return)
Note: The upload files are from the host's current directory. For example, the FTP command that runs under the/usr/my, only the file Linux under/usr/my will be uploaded to the server/usr/your.
4. Disconnect the connection
Bye: Interrupts the connection to the server.
Ftp> Bye (carriage return)
All of the above methods can only be one download file.
If you want to bulk download, there is another good way.
To be solved by wget
The code is as follows |
Copy Code |
wget ftp://ip:port/*–ftp-user=xxx–ftp-password=xxx-r
|
Note:
Asterisk * must have, otherwise download down on a file index.html
The-r parameter is used for directory downloads
I will download the file into a zip, it is convenient to pull to the local.