remove [64] cleanup TODO
[trinity.git] / scripts / clean-cores.sh
blob0b90be677bff4cfe24b788e28af92f834bf757d2
1 #!/bin/sh
3 TRINITY_PATH=${TRINITY_PATH:-.}
5 # remove old cores
6 for i in `find . -name "core.*" -exec ls -l {} \; | grep -v "$(date +%b\ %e)" | awk '{ print $9 }'`; do rm -f $i; done
8 # Remove corrupted cores
9 find . -empty -name "core.*" -exec rm -f {} \;
10 for i in $(file core.* | grep -v $TRINITY_PATH/trinity | awk '{ print $1 }' | sed 's/://'); do rm -f $i; done