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