Mar 212009
 

Made this small script for this purpose…

#!/bin/bash
#
# Script to check a directory and write in file the new files
# since last check.
#
# Written by RoarinPenguin (
roarinpenguin@rottigni.net) on
#
21 march 2009
# Released under GPL License
#
# You need to create a file called lastcheck.time in same
# directory of this script
#

ADMIN="change to administrator email address"
DIR2MON=/var/www/dir-clienti

> ./newfiles.list
echo "Last check for new files, done on "`date` >> ./newfiles.list
find $DIR2MON -maxdepth 5 -newer ./lastcheck.time >> ./newfiles.list
touch ./lastcheck.time

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)