Bash脚本:监控hotfolder和部分文件

我有一个客户通过FTP上传文件,我制作了一个基本上监控ftp文件夹并在生产机器上移动文件的脚本.
在启动my scp命令之前,如何通过ftp检查文件是否已完全从客户传输,以避免传输部分文件
如果您的操作系统支持它,您可以查看 incrond.可以监控的事件在 incrontab中定义.也许您要查找的事件是

IN_CLOSE_WRITE File opened for writing was closed (*)

或与…结合使用

IN_CREATE File/directory created in watched directory (*)

注意

When monitoring a directory,… the events above can occur for files in the directory,in which case the name field in the returned event data identifies the name of the file within the directory.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...