lftp的使用

* lftp官方网站
  http://lftp.yar.ru

* lftp帮助
  lftp --help-----lftp命令的帮助
  lftp->help-----lftp命令列表
  lftp->help command-----lftp命令帮助
  man lftp-----lftp程序man手册
  http://vsftpd.beasts.org/vsftpd_conf.html-----在线man帮助

----------文件

     /etc/lftp.conf
          system-wide startup file. Actual  location  depends  on
          --sysconfdir  configure  option. It is /etc when prefix
          is /usr, /usr/local/etc by default.


     ~/.lftp/rc, ~/.lftprc
          These  files  are  executed  on  lftp   startup   after
          /etc/lftp.conf.

     ~/.lftp/log
          The  file things are logged to when lftp moves into the
          background in nohup mode.

     ~/.lftp/transfer_log
          The file transfers are logged to when xfer:log  setting
          is set to `yes'.

     ~/.lftp/bookmarks
          The  file  is  used to store lftp's bookmarks.  See the
          bookmark command.

     ~/.lftp/cwd_history
          The file is used to store last working directories  for
          each site visited.

     ~/.netrc
          The file is consulted to get default login and password
          to ftp server.  Passwords are also searched here if  an
          URL with user name but with no password is used.


----------配置
* 如何显示ftp服务器的欢迎信息和错误信息
  在配置文件~/.lftp/rc中加上debug 3


----------命令

* 如何运行lftp
  键入lftp即可启动lftp程序。

* 如何连接ftp服务器
  语法:open [-e cmd] [-u user[,pass]] [-p port] host|url
  例子:open -u ftp,ftp -p 21 ftp://192.168.198.3

* 如何查看ftp服务器的文件
  [re]ls [args]-----ls要求服务器格式化文件列表
  [re]cls [opts] [path/][patten]-----cls自己格式化文件列表
  注:re表示清除缓存,刷新文件列表

* 如何改变远端当前目录
  cd rdir-----原目录被保存为'-'

* 如何改变本地当前目录
  lcd ldir-----原目录被保存为'-'

* 如何下载单文档
  语法:get [OPTS] <rfile> [-o <lfile>]
  例子:get -c file1.txt-----断点续传文件
   
* 如何上传单文档
  语法:put [OPTS] <lfile> [-o <rfile>]
  例子:put -c file1.txt-----断点续传文件

* 如何下载多文档
  语法:mget [OPTS] <files>-----文件名支持通配符
  例子:mget -c file1.txt file 2.txt

* 如何上传多文档
  语法:mput [OPTS] <files>-----文件名支持通配符
  例子:mput *.txt

* 如何下载目录
  语法:mirror [OPTS] [source [target]]
  例子:mirror -r ./myfolder1 ./test-----不递归下载

* 如何上传目录
  语法:mirror [OPTS] [source [target]]
  例子:mirror -R ./test ./folder1-----递归上传

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值