ftp 批量操作(mput mget)
? ftp ?    2019-01-11 16:22:44    14801    1    0
gua_l   ? ftp ?

用ftp 传文件时,两个参数时,表示

put <remote-filename> <local-filename> 

get <local-filename>  <remote-filename> 

单个参数,表示默认用同名参数保存。

put test1.txt 表示把 test1.txt 放到ftp 目录,并用同名test1.txt保存。

put test1.txt test2.txt 表示test1.txt 放到ftp 目录,并用异名test2.txt保存。


 

那如果我们是有两个文件test1.txt 和test2.txt ,只能分开执行两次put

put text1.txt

put test2.txt

 

如果我们需要一次批量上传,需要把 Interactive mode 关了

ftp> prompt

//执行一次是off ,两次则是打开on

ftp>mput  <file1> <file2> 

ftp>mput *

同理,批量下载文件对应 mget 。

 

 

Pre: GitLab GEO 异地主副服务器同步--文档翻译

Next: mount/nfs 共享目录

14801
Sign in to leave a comment.
No Leanote account? Sign up now.
0 comments
Table of content