How do you run command every time a file is modified?
Answer / Manoj Kumar Kaushal
Use the 'inotifywait' or 'incron' commands to trigger a script whenever a file is modified. Here is an example using inotifywait:n`n while true ; do inotifywait -e modify path/to/your/file ; sh /path/to/script.sh ; donen`
| Is This Answer Correct ? | 0 Yes | 0 No |
What is pwd in linux command?
what is a command to display top 10 users who are using Huge Space?
What does chmod 777 do?
How do you view the contents of a file in Linux?
What is the most graceful way to get to run level single user mode?
What is ll command in unix?
What is Data Command?
What is the use of ls command?
what is the difference between RHEL4 & RHEL5?
i dont know root password then this situation can we change or break root password to ant process
What is help command in linux?
hi friends how to reinstall the grub.conf file. once i delete the grub file in perminatle ofter how to get back that file. plz send me ans. regards. madhu.m