1 2 3 4 5 6 7
#!/bin/sh clean_files="*.core" for file in ${clean_files}; do find "${HOME}" -maxdepth 2 -iname "*.core" -exec rm {} \; done