linux - Move file on CLOSE -


i have process continually writing new files directory. when current file reaches size, creates new 1 timestamp. rolling log files, example.

when process closes current file (a) , creates new one, move a new directory processing. i'm not sure of best way this...

i wrote bash script runs every few minutes, lists files in dir sorted time, , moves recent. works, can't feel there better way, more event-driven. looking @ using inotifywait , capturing close_write,close event file ...

any suggestions?

thanks!

found better way. using incron:

http://inotify.aiken.cz/?section=incron&page=why&lang=en


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -