2017-09-25 92 views

回答

1

inotifywait文檔:

  • close_write

    甲觀看的觀看目錄中的文件或文件被關閉,在可寫模式被打開之後。這並不一定意味着該文件已被寫入。

close_write只有當一個文件被關閉觸發


tail -f /somefile >> /soemeotherfile.dat 

......不斷追加到someotherfile.dat。它不會關閉它後,每個人寫。

可能您希望改爲modify事件。