diff --git a/aerofs/aerofs-clean b/aerofs/aerofs-clean index 7775853..bcfe246 100755 --- a/aerofs/aerofs-clean +++ b/aerofs/aerofs-clean @@ -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