delete old with aero

This commit is contained in:
ville rantanen
2013-11-05 22:56:24 +02:00
parent 9a19b98616
commit 3d30b69342

View File

@@ -7,17 +7,23 @@ AEROAUX=($MyDir/.aerofs.aux*)
if [ -z "$1" ]
then echo partial/revisions/conflicts: '(-f to delete.)'
then echo partial/revisions/conflicts: '(-f to delete all. -d to delete +3 days)'
du -h -d 1 "$AEROAUX/"
exit 0
fi
while getopts "f" OPTS;
while getopts "df" OPTS;
do case ${OPTS} in
f)
find "$AEROAUX/r" -mindepth 1 -depth -exec rm -Rf \{\} \;
find "$AEROAUX/p" -mindepth 1 -depth -exec rm -Rf \{\} \;
du -h -d 1 "$AEROAUX/"
;;
d)
find "$AEROAUX/r" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
find "$AEROAUX/p" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
du -h -d 1 "$AEROAUX/"
;;
esac
done