Linux基础命令---mirror获取ftp目录

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

posted @ 2019-05-24 09:23  一生有你llx  阅读(2261)  评论(0编辑  收藏  举报