auto rm
00 21 * * * /home/opcenterap/bin/rmfile40.sh
if [ -d /ftpdata ]; then
for dfile in /ftpdata/*; do
for mf in `find $dfile/upload -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
for mf in `find $dfile/download -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
for mf in `find $dfile/opDM -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
done
fi
if [ -d /ftpdata ]; then
for dfile in /ftpdata/*; do
for mf in `find $dfile/upload -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
for mf in `find $dfile/download -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
for mf in `find $dfile/opDM -name "*" -type f -mtime +40 -print`; do
echo $mf
rm $mf
done
done
fi