#!/usr/bin/bash for i in `find . -type d ` do if `test -e $i/core` then echo "Removing $i/core" rm $i/core fi done