Simple Lftp use steps, lftp use steps
One user needs to back up data to storage on Linux, but does not support mounting. Only FTP is supported.
Find the FTP Client Lftp to meet your needs.
Reference: http://blog.chinaunix.net/uid-24993824-id-470961.html
#yum install lftp
1. log on to ftp
Code:
Lftp User name: password @ ftp address: transfer port (port 21 by default. If it is port 21, you do not need to add it)
#lftp root:123456@192.168.1.186:21
<PS: it is best not to have special characters. Otherwise, the system may prompt that the parameter does not exist. Add a number to the character.>
There are a lot of writing methods here, so I will not write much. I personally feel that this is enough. There are many types of references mentioned above. If you are interested, you can link them for reference.
<Switch directories. Some directories do not have permission. to upload directories, you must have permission to create directories.>
#cd testftp
2. upload a file <followed by a local directory>
#mirror -R /home/backfile/
3. download the file <Following the remote directory>
#mirror aaa/
I copied some other information to the source of the document. for more information, see. I just sent the documents and related commands. there is no difference with Linux. you can directly help. view it.
---------------------------------------------------------------
1. log on to ftp
Code:
Lftp User name: password @ ftp address: transfer port (default: 21)
Usage
(1) lftp username: password@127.0.0.1: 21 press enter (2) lftp username@127.0.0.1 press Enter # default port 21 press enter and enter the password (3) lftp 127.0.0.1 press Enter # Press enter after login (4) lftp press enter --> open 127.0.0.1 --> login
I feel like Kong Yiji, and there are several ways to write "shen" of xiangdou! ~ Really dizzy Ah ~
2. lftp Chinese garbled characters
For beginners like me, what I see after login is Chinese garbled characters (because the local code is usually UTF-8). How can this problem be solved by using the set command?
Set ftp: charset gbk (or gb2312 or UTF-8) # set the ftp encoding format set file: charset UTF-8 (... same as above) # set the local encoding format
Appendix: set command skills (1) Enter set to view the configured command (2) set-a to view all the commands that can be set clear Network
3. Search for ftp files
Ls *. txt # search for all txt files in the current directory ls. /123/## list all files in the 123 directory find. -name "*. txt "# recursively find all txt files on the site. /xx-name "*. txt "# search for all txt files under the xx directory
Appendix 1: ls reads the local cache for the second time. You can use rels instead of ls or catch off/catch on to switch catch. catch flush clears the local catch.
Appendix 2: commands for viewing local directories are available! Ls, such! Ls/usr/local/bin/
4. Download an object
Before downloading an object, you must set a local directory to store the downloaded object.
LCD/home/123/web # Set the local storage directory to/home/usrget 123.txt by default. Download The 123.txt file to/home/123/web to get-c 123.txt # resumable download mget *. txt ## batch download all txt files mget-c *. txt # resumable mget-c. /123/aaa /*. txt # resumable upload and batch download of all txt files under the ftp aaa directory pget-c-n 10 file. dat
# Download file. dat using a maximum of 10 threads to allow resumable Data Transfer
# You can use the default value by setting the set pget: default-n 5 value.
mirror aaa/
# Download the entire aaa directory, and the subdirectory will automatically copy the local directory and automatically create the Directory
5. upload files
Put 123.txt # Same download mput *. txt # Same download mirror-R aaa/# Same download
-----------------
Well, I copied some useful ones. Some others are not very common. Or that sentence. If necessary, you can view the referenced address.