SHORT_HOSTNAME=`hostname -s` LOCATION="/home" # DESTINATION="$1" if [ -z "$1" ] then DESTINATION="$LOCATION" fi # EMAIL_TO="test@rmohan.com" EMAIL_SUBJECT="List Last Modified files from $SHORT_HOSTNAME" EMAIL_BODY_Line1="Below is the list of last modified files:" # MOD_FILES=`find $DESTINATION -type f -mmin -10 -ls` # if [ -n "$MOD_FILES" ] then printf "$EMAIL_BODY_Line1\n\n$MOD_FILES\n" | mail -s "$EMAIL_SUBJECT" $EMAIL_TO fi #
Recent Comments