mirror
使用lftp登入ftp伺服器之後,可以使用mirror指令從伺服器擷取目錄
1、文法
mirror [OPTS] [source [target]]
2、選項清單
-c
如果失敗,持續擷取
-n
隻下載下傳新檔案
-r
不下載下傳子目錄
-p
下載下傳時不設定權限
-L
将符号連結當做檔案
3、執行個體
擷取目錄
[root@localhost weijie]# lftp 192.168.1.8 //登入伺服器
lftp 192.168.1.8:~> cd pub/ //切換目錄
lftp 192.168.1.8:/pub> mirror testftp/ //下載下傳目錄
Total: 1 directory, 2 files, 0 symlinks
New: 2 files, 0 symlinks
lftp 192.168.1.8:/pub> quit //退出
You have new mail in /var/spool/mail/root
[root@localhost weijie]# ls //檢視内容,已經擷取到目錄
1 11c 1.zip 2.c.bz2 4.c 6.c~ rec000012.c.bz2 testftp
1. 11.c 22c 3.c 5.c col res.zip
[root@localhost weijie]#
做了一個Linux學習的平台,目前出來一個雛形,各位可以參考使用
連結:
https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ密碼:n7bk
