Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The situation is:

I have a shared directories from many other machines where other users work on.

I need to be notified whenever a user create, modify or delete a directory or file from his local directory which I share using smb...

It looks like the folder actions in the MAC systems..

Is there a software that do that?!

If there is no such application, any help in writing a script for that is appreciated..

Thanks in advanced...

share|improve this question
If no one gives an answer in a couple of days for a program/script. Then reply with a comment here (so I get a notification) and I can look into writing a quick script. I am a little busy today. – Julian Stirling Dec 30 '13 at 12:31
@JulianStirling Ok friend sure i'll do. Thanks anyway – Maythux Dec 30 '13 at 13:09
@JulianStirling It seems no body can help.. When you have some time please help – Maythux Jan 1 '14 at 8:45
Right, just to clarify you want a script to make an on screen notification every time someone changes a file in a folder? What do you want it to do if your pc is off? Bring up a list? Do you need to dismiss items when they are somehow tracked? – Julian Stirling Jan 2 '14 at 17:36
@JulianStirling I want a script to make screen notification every time someone changes a file/folder in a Shared folder. – Maythux Jan 3 '14 at 7:39
up vote 5 down vote accepted

OK, first install inotify:

sudo apt-get install inotify-tools

Then make a new script on your computer named whatever you want ( and paste in:

#! /bin/bash


inotifywait -m -q -e delete -e create -e move -e modify -r --format '%:e %w%f' $folder | while read file
    zenity  --title="Modifaction" --text "$file" --info&

Modify the folder to the one you want, save, and then exit.

Make the file executable:

chmod +x

And then you should be ready to rock.

share|improve this answer
Great, thanks man – Maythux Jan 3 '14 at 12:38

You may use iwatch to watch a specific folder (directory) which itself relies on inotify (inode notify), a subsystem in the Linux kernel which extends filesystems to notice changes within them, and report those changes to applications.

Download it from then once installed, open a terminal window and run

iwatch /folder

where /folder is changed to the directory you want to watch.

share|improve this answer
can you help me in incron – nux Dec 31 '13 at 20:24
ty my friend , happy new year , just one other question how it will notify me ? – nux Dec 31 '13 at 21:29
A message will appear in that window. However, the iwatch web page linked above shows other options if you want to consider them. And, OBTW, if an answer to your question is good, please click on the checkmark-on-circle icon at left to show it was good. You can change that later if a better answer comes up which meets your needs more directly. This also adds karma points to your rep. – K7AAY Dec 31 '13 at 21:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.