cd /opt/app/osaaf/logs for D in `find . -type d`; do if [ "$D" != "./" ]; then rm -f $D/*.log.* fi done