通过lftp将文件上传到远程主机

时间:2017-09-30 16:09:08

标签: bash macos ftp lftp

我有这个脚本来上传和删除远程主机上的文件:

#!/bin/bash

echo Starting Website upload ...
echo This may take some time depending on your internet connection ...
echo Waiting for remote connnection ...

lftp -u server121.web-hosting.com << ftpEOF
    prompt
    cd public_html
    delete index.html
    cd images
    mdelete *.jpg
    cd ..
    lcd /Applications/PlexEmail/streamnet/
    put index.html
    lcd images
    cd images
    mput *.jpg
    bye
ftpEOF

echo Website upload successfull ...

将我的Mac升级到High Sierra 10.13后,ftp命令不再存在。

关于如何使用lftp工作的任何想法?

0 个答案:

没有答案