wav-del.sh
368 Bytes
#!/bin/bash
list=`find /home/sharedfs/records -maxdepth 1 -type d -not -iname "30836"`
for dir in $list; do
if [ "$dir" != "/home/sharedfs/records" ]; then
find $dir -ctime +90 -exec rm -rf {} \;
fi
done
find /home/sharedfs/records/30836 -ctime +180 -exec rm -rf {} \;
find /home/sharedfs/records/ -maxdepth 1 -type d -ctime +90 -exec rm -rf {} \;