LFTP command
The LFTP command is an excellent file client program that supports a variety of file transfer protocols, such as FTP, SETP, HTTP, and FTPs.
LFTP Support tab Auto-completion, do not remember the command to double-click the TAB key, you can see the possible options.
Grammar
LFTP (option) (parameter)
Options
-F: Specifies the script file to be executed by the lftp instruction;
-C: Exits after executing the specified command;
--HELP: Display Help information;
--version: Displays the version number of the instruction.
Parameters
Site: The IP address or domain name of the site you want to access.
Instance
Log in to FTP
LFTP Username: password @ftp address: Transfer port (default 21)
You can also log in without the user name, and then use the login command in the interface interface to log in with the specified account, the password is not displayed.
viewing files and changing directories
LS CD corresponds to FTP directory
Download
Get can of course, you can also:
Mget-c *.pdf #把所有的pdf文件以允许断点续传的方式下载.
Mirror aaa/#将aaa目录整个的下载下来, subdirectories are also copied automatically.
PGET-C-N file.dat #以最多10个线程以允许断点续传的方式下载file. Dat, you can use the default value by setting the value of the pget:default-n.
Upload
The same put, Mput is the operation of the file, and the download is similar.
Mirror-r Local directory names the local directories are passed back to the FTP site in an iterative way, including subdirectories.
Mode settings
Set Ftp:charset GBK
Remote FTP site with GBK encoding, corresponding to set to UTF8, as long as the replacement GBK for UTF8.
Set File:charset UTF8 local charset is set to UTF8, if you are GBK, change accordingly.
Set Ftp:passive-mode 1 Using passive mode login, some site requirements must be passive mode or active mode to log in, this switch is the setting of this. 0 represents no Passive mode.
Bookmark
In fact, the command line can also have bookmarks at the Lftp terminal prompt:
Bookmark Add USTC
You can store the FTP site currently being browsed with USTC as a label. After the shell terminal, the direct lftp USTC can automatically fill out the user name and password, into the corresponding directory. Bookmark Edit invokes the editor to manually modify the bookmark. Of course, you can also see that this bookmark is actually a simple text file. Password, user names can be seen.
Configuration file
Vim/etc/lftp.conf General, I will add these lines: Set Ftp:charset GBK set File:charset UTF8 set pget:default-n 5 So, you don't have to command every time you enter. The other set can tab and help to see.
Linuxe lftp Command (vii)