inotify -watch for file to change
Here is a simple command for you. It uses inotify tools. So first you need to install :
sudo yum install inotify-tools
and then you can try something like this:
while true; do inotifywait -r -e modify --exclude=".swp" . && make; done
Here, once the file changes, we are running make, but you can do anything you want.
Related articles
Related Articles:
- 2013/08/16 Delete all but some directories
- 2011/09/27 some interesting alias
- 2010/12/05 New feature in Gnome/Nautilus
- 2014/01/16 vim – yank/xopy in different register to paste
- 2013/11/12 cvs add files recursively – not already in repository
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.