diff --git a/Full/system/etc/init.d/logscleaner b/Full/system/etc/init.d/logscleaner index beab334..ecd4315 100755 --- a/Full/system/etc/init.d/logscleaner +++ b/Full/system/etc/init.d/logscleaner @@ -1,30 +1,34 @@ #!/system/bin/sh echo "logscleaner init script" -echo "Starting Automatic Cleaning $(date +"%m-%d-%Y %H:%M:%S")" +echo "Starting Automatic Cleaning at $(date +"%m-%d-%Y %H:%M:%S")" # remove files older than a week to prevent pollution # filemask: * for logpath in /data/log /data/slog /data/tombstones \ /data/system/usagestats/0; do - find ${logpath} -mtime +8 -type f -exec rm -f {} \; + find ${logpath} -mtime +8 -type f -print \ + -exec rm -f {} \; 2>/dev/null done # filemask: *.tmp for logpath in /data/data/*/*/* /data/data/*/*/*/* \ /data/backup/pending/; do - find ${logpath} -mtime +8 -type f -name '*.tmp' -exec rm -f {} \; + find ${logpath} -mtime +8 -type f -name '*.tmp' \ + -print -exec rm -f {} \; 2>/dev/null done # filemask: *.apk for logpath in /data/local/ /data/local/tmp; do - find ${logpath} -mtime +8 -type f -name '*.apk' -exec rm -f {} \; + find ${logpath} -mtime +8 -type f -name '*.apk' \ + -print -exec rm -f {} \; 2>/dev/null done # filemask: *.* for logpath in /cache /cache/recovery /data/system/dropbox; do - find ${logpath} -mtime +8 -type f -name '*.*' -exec rm -f {} \; + find ${logpath} -mtime +8 -type f -name '*.*' \ + -print -exec rm -f {} \; 2>/dev/null done echo "Automatic Cleaning finished at $(date +"%m-%d-%Y %H:%M:%S")"