remove_trash_files.sh 235 B

1234567891011121314
  1. #!/bin/bash
  2. rootpath="$(pwd)/.."
  3. rootpath=$(builtin cd $rootpath; pwd)
  4. cd ${rootpath}
  5. echo ${rootpath}
  6. to_remove="*~* *._* *.DS_Store"
  7. for filepattern in $to_remove; do
  8. echo ${filepattern}
  9. find . -name ${filepattern} -delete
  10. done