Linux 常用工具小結:(1) lftp工具使用。

來源:互聯網
上載者:User

這裡會按照一些比較常用的功能列出,並舉一個具體的例子逐一解釋功能。

 

通常使用ftp過程是登陸ftp,瀏覽ftp內容,下載ftp檔案,或者上傳ftp檔案。

 

1.         使用ftp的第一步要做的是登陸。

lftp登陸命令:

lftp  user:password@site:port 例子: lftp geewu:geewu@10.2.0.190

lftp site:port -u user,password 例子: lftp 10.2.0.190 –u geewu,geewu

預設使用者登陸:lftp 10.20.190

 

進入ftp之後

#lftp>

 

2.      尋找檔案

在命令中輸入 ls,會列出目前的目錄下所有檔案。

lftp 10.20.190: > ls

drwxr-xr-x 1 ftp ftp              0 Apr 27 17:05 Office

drwxr-xr-x 1 ftp ftp              0 Apr 06 2011 Oracle

….

 

3.         進入Oracle目錄

在命令中輸入cd,會進入Oracle目錄

lftp 10.20.190: > cd Oracle

 

4.         列出Oracle目錄下的所有檔案

lftp 10.2.0.254:/Oracle/Oracle11g> ls

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

-rw-r--r-- 1 ftp ftp      995359177 Dec 07 2010 linux_11gR2_database_2of2.zip

 

 

5.         下載Oracle目錄的中的兩個檔案

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

 

更多功能:

批量下載: mget *.txt

多線程下載: pget -n 4 linux_11gR2_database_1of2.zip

下載本地檔案改名:

get rfile -o lfile
抓 rfile 到本地改名為 lfile
-c 為續傳
-E 抓檔完成後, 將遠端的檔案砍了
-a 為 ascii mode, 預設為 binary mode

切換本地下載路基路基:切換進入oracle檔案夾中

lcd /home/geewu/oracle。 

 


-O 設定 base directory 為本地端放檔案的目錄

 

 

更多參考:

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.