|
Most efficient way to list files changed since a specific time
I am wanting to implement a backup solution that will copy all of the files that have changed in a particular directory every 15 minutes. My first thought was to use the find command, but running the following script resulted in the output below. Basicaly it took 90 minutes to find the files that had been changed in the last 15 minutes which is a bit counter productive.
Is there something faster than find? Should I write my own C program?
<Script testfind.sh>
date
find /data1/docimg/ -mmin -15 -exec echo {} \;
date
</script>
<output>
Thu Apr 7 08:18:51 EDT 2005
/data1/docimg/
/data1/docimg/05975272.tif
/data1/docimg/05974024.tif
/data1/docimg/testfind.sh
/data1/docimg/05975414.tif
/data1/docimg/00446508.tif
/data1/docimg/00449674.tif
/data1/docimg/00449695.tif
/data1/docimg/00449013.tif
/data1/docimg/05975537.tif
/data1/docimg/05974971.tif
/data1/docimg/05975563.tif
/data1/docimg/00449750.tif
/data1/docimg/00449758.tif
/data1/docimg/05975592.tif
/data1/docimg/25050005.tif
/data1/docimg/05967185.tif
/data1/docimg/25050031.tif
/data1/docimg/05975631.tif
/data1/docimg/00448535.tif
/data1/docimg/00449129.tif
/data1/docimg/05975649.tif
Thu Apr 7 09:45:57 EDT 2005
</output>
|