1

Find modify and delete files

view story
linux-howto

http://www.unix.com – hi every one. one of my friends has writen this script and send it to me. this script can find files that add-delete-modify and also send an alert by email i'm not catch all part of it. can anyone explain me how this work Code: #!/bin/bash START="a.txt" END="b.txt" DIFF="c.txt" mv ${START} ${END} #moving the first file to be compared find /home -type f -mmin -5 -print > ${START} diff ${START} ${END} | grep '<' > ${DIFF} COUNT=$(cat ${DIFF} | wc -l) if [[ -s ${DIFF} ]] ; then cat -- ${DIFF} | mail -s "Modified files in last 5 minu (HowTos)