Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

The Caml Hump: Newfaction


The program newfileaction (newfaction) invokes a program for each file that newly is created in a directory you want to visit. It's similar like the "watch" program. When the watch-program is invoked, it starts a command on the shell every n seconds and shows you the results on the screen. This is good for watching the result of commands every n seconds. newfaction is slightly different: it invokes the command for each new file in a directory. So for example, if you get all the time new files into your directory (e.g. by copying them from a remote-host to your locval host via ftp or scp) then you can invoke a program for each of these files. For example you could start your vi-editor for each new file, if you know there are coming text-files, or you could invoke xv for each file, if you know there are coming pictures into the incoming-directory.
Homepage ]
Author:Oliver Bandel.
Last modification date:22-Jun-2007
Development status:Stable
Kind: Applications written in Caml :: Others
Topic: System :: File systems and system administration