我是脚本的新手,但我无法解决这个问题。我想在服务器上上传使用 lftp 构建竹子的结果。我使用以下命令:
lftp sftp://user:pwd@ipaddressOfServer -e "put -O remoteFolder/ fileName.fileExtension; bye"
根据我对以下文档的理解,我应该是正确的(http://linux.about.com/od/commands/l/blcmdl1_lftp.htm):
put [-E] [-a] [-c] [-O base] lfile [-orfile]
Upload lfile with remote name rfile. If -o omitted, the base name of lfile is used as remote name. Does not expand wildcards, use mput for that.
-o specifies remote file name (default - basename of lfile)
-c continue, reput
it requires permission to overwrite remote files
-E delete local files after successful transfer (dangerous)
-a use ascii mode (binary is the default)
-O specifies base directory or URL where files should be placed
但相反,我在竹任务日志中有这个输出:
/bamboo+projectInfo/build/target/remoteFolder: No such file or directory
似乎本地和远程结构混淆了。如果我只传输没有 remoteFolder 信息的文件,它工作正常。但这并不是我想要的。任何见解将不胜感激...