Common Linux tools: (1) Use lftp.

Source: Internet
Author: User

Here we will list some common functions and explain the functions one by one with a specific example.

 

FTP is usually used to log on to FTP, browse FTP content, download FTP files, or upload FTP files.

 

1. The first step to use FTP is to log on.

Lftp logon command:

Lftp User: password @ site: Port example: lftp geewu: geewu@10.2.0.190

Lftp site: Port-u user, password example: lftp 10.2.0.190-u geewu, geewu

Default User Logon: lftp 10.20.190

 

After entering FTP

# Lftp>

 

2. Search for files

Enter ls in the command to list all files in the current directory.

Lftp 10.20.190:> ls

Drwxr-XR-x 1 FTP 0 Apr 27 17: 05 Office

Drwxr-XR-x 1 FTP 0 APR 06 2011 Oracle

....

 

3. Go to the Oracle directory

Enter cd in the command to enter the Oracle directory

Lftp 10.20.190:> cd Oracle

 

4. list all files in the Oracle directory

Lftp 10.2.0.254:/Oracle/Oracle11g> ls

-Rw-r -- 1 ftp 1285396902 Dec 07 2010 linux_11gR2_database_1of2.zip

-Rw-r -- 1 ftp 995359177 Dec 07 2010 linux_11gr2_databasesilicate f2.zip

 

 

5. Download two files in the Oracle directory

Lftp 10.2.0.254:/Oracle/Oracle11g> get linux_11gR2_database_1of2.zip

 

More functions:

Batch download: mget *. txt

Multi-thread download: pget-n 4 linux_11gR2_database_1of2.zip

Rename the downloaded local file:

Get rfile-o lfile
Capture rfile and rename it lfile
-C: Resume
-E. After the file is captured, the remote file is cut down.
-A is an ascii mode and the default value is binary mode.

Switch local download subgrade: switch to the oracle folder

LCD/home/geewu/oracle.

 


-O sets the base directory as the directory for storing files on the local end.

 

 

For more information, see:

Http://blogold.chinaunix.net/u2/71520/showart_1002987.html

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.