i want to use this shell script, when a directory has changed.
How can i add monitoring to a specific directory and run this script when something has changed? And how can i send an email notification?
Code: Select all
#!/bin/bash NOW=$(date +%Y%m%d%H%M) HOST=$(hostname) echo $NOW FILE=/var2/backup/HomeManagement/$NOW.HomeManagement.tar tar -czf $FILE /var/www/HomeManagement