#!/bin/bash if [ ! "$(pwd | grep scripts$)" ] ; then echo "Working directory is wrong" exit 1; fi . _defines.sh CURRENT_DIR=`pwd` for type in f l; do find $BASE_PATH/www/userfiles/files -regextype posix-extended -type $type -regex ".*_[0-9]+x[0-9]+(o|g|og|cf|cfg|cc|ccg|clg)?\.[^\.]+$" -exec rm -f {} \; done rm -Rf $BASE_PATH/www/userfiles/fckthumbs/* cd $CURRENT_DIR