And*_*ift 4 files sftp wildcard
从几十个文件的目录中,是否可以使用 SFTP 一次 GET 或 PUT 两个文件?
我不想使用通配符,因为我不一定知道所有文件的名称,也不想影响其他文件。
我希望有类似的东西:
get javascript.gs,stylesheet.css
Run Code Online (Sandbox Code Playgroud)
从谷歌搜索和查看各种 Stackexchanges 来看,这似乎是不可能的。
有人有确切消息么?
如果可能,请lftp用作您的 sftp 客户端(可用于所有相关的 Linux 发行版和软件包集合中的 *BSD):
lftp sftp://someaccount@somehost.com
Run Code Online (Sandbox Code Playgroud)
然后你可以使用mget命令:
mget javascript.gs stylesheet.css
Run Code Online (Sandbox Code Playgroud)
如果lftp无法使用,则可以-b在标准sftp命令中使用(batch) 选项。首先创建一个文本文件,其中包含
get javascript.gs
get stylesheet.css
Run Code Online (Sandbox Code Playgroud)
然后使用命令
sftp -b yourtextfile.txt someaccount@somehost.com
Run Code Online (Sandbox Code Playgroud)