[Gllug] Smart directories: Cron or fancier

will will at hellacool.co.uk
Mon Sep 27 10:47:27 UTC 2004


Tom Schutzer-Weissmann wrote:
> Hello all
> 
> We'd like to create a shared directory that converts image files; the
> user saves, say, a JPEG, and it's immediately turned into PNG. I could
> use cron to check the directory every minute for new files, but
> wondered: is there a smarter or more instant way of checking for new
> files?
> 
> I considered using a SAMBA pseudo-printer, but (maybe I'm wrong) you
> can't mount those as normal filesystems, which is what I want.

I don't know of any 'smart directory' capability like you mention, but 
have a look at fam (man fam), you may be able to write an application to 
do this and use fam to ensure it only runs when the content of a 
directory is changed[0].

Will.

[0]I am fairly sure fam can monitor directories, but it is worth double 
checking :)
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list