D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] FAM

 

On Tuesday 11 July 2006 09:37, Neil Stone wrote:
> Unless there is a better way....?
>
> Using proftpd on Debian stable right now.

dnotify is your friend (although it only recently made an apperance in kernel 
proper, so don't know about debian stable)

dnotify --create /path/to/directory -e /script/to/run

only problem is, dnotify is triggered upon various actions (create, delete, 
modify etc - see man dnotify).  however, you want to know when the file is 
nologner being written to.

best bet it is a script to use dnotify to learn of creations, then poll at 
regular intervals until file size if no longer changing, or even better, no 
processes have file open.

if you're feeling really adventurous, then take a look at FUSE.

 ~ Theo

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html