【问题标题】:Execute FTP command file in Linux在 Linux 中执行 FTP 命令文件
【发布时间】:2018-08-02 10:29:28
【问题描述】:

如标题所述,我想登录ftp 服务器并使用ftp 命令运行本地FTP 命令文件,该命令将通过php 执行。我过去曾这样做过,但使用 sftp 而不是 ftp

我想实现类似于我为sftp 所做的以下事情:

sftp -b commands.txt user@host

commands.txt 文件包含要在服务器中运行的ftp 命令(例如mget

【问题讨论】:

    标签: linux shell ftp


    【解决方案1】:

    Common Linux ftp 没有提供脚本文件的任何选项。

    但您可以改用standard input redirection

    ftp < commands.txt
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-09
      • 2011-06-11
      • 2021-08-19
      • 1970-01-01
      • 2013-06-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多