对于某些reasom,我无法获得最后一行的工作。它使我在lftp [email protected]:〜>提示符下。有什么建议?无法在bash脚本中运行镜像命令
#!/bin/bash
echo "This will sync the background_docs folder"
lftp ftp://user:[email protected]
mirror -r background_docs --only-missing -e
对于某些reasom,我无法获得最后一行的工作。它使我在lftp [email protected]:〜>提示符下。有什么建议?无法在bash脚本中运行镜像命令
#!/bin/bash
echo "This will sync the background_docs folder"
lftp ftp://user:[email protected]
mirror -r background_docs --only-missing -e
我猜你想LFTP运行最后一行,
mirror -r background_docs --only-missing -e
吧?
如果是这样,你必须告诉它这样做。正如它写的,脚本只是启动lftp,等待它完成,然后才会尝试执行最后一行。
你可能就要什么是使用lftp
的-e cmd
选项,因为这样的:
#!/bin/bash
echo "This will sync the background_docs folder"
lftp -e "mirror -r background_docs --only-missing -e" ftp://user:[email protected]
+1给出了可以工作的实际'lftp'命令。 :) – sarnold
这工作,现在我只需要等待几分钟就可以接受。 – Kelbizzle