Send e-mail alert when file size changing
I would like to send e-mail alert for me and play a sound when a text file changed (for example append one row into to file ). How can I do that?
I guess bash programming, but I don't know how to do this. No GUI, only CLI interface. OS: GNU/Debian Could you help me, please? for example: file.txt contain these rows: andrew thomas eva and when append a new row I get an e-mail/and sound alert. Thanks in advance. |
Quote:
As a hint, you need to look at the inotify command, or at the very least try putting "watch a file for changes in linux" into Google. The over 1.5 MILLION hits there can also get you started. |
You can write a bash script that uses inotify-tools i.e. inotifywait to monitor the file for changes and then perform some action.
https://github.com/rvoicilas/inotify-tools/wiki#info |
Thanks for your help.
I will try "notify-tools". |
All times are GMT -5. The time now is 04:17 AM. |