Home > Interesting, Just Learnt Something New (JLSN) > JLSN – incron, inotifywait

JLSN – incron, inotifywait

Problem:
Needed to run a script every time a file was placed in a certain folder. So you want the script triggered when a file is created or deleted.

Solution:
To run in a shell install inotify-tools, you will get inotifywait. But if you want a daemon that runs and calls a script or performs an action then install incron. YMMV.

Read more about incron:
http://zipizap.wordpress.com/2013/11/15/incron/
http://www.howtoforge.com/triggering-commands-on-file-or-directory-changes-with-incron

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: