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

前端之家收集整理的这篇文章主要介绍了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.

原文链接:https://www.f2er.com/bash/385458.html

猜你在找的Bash相关文章