From: Ansgar Burchardt Date: Mon, 27 Jul 2015 08:03:41 +0000 (+0200) Subject: Use "find ... -delete" instead of "find ... | xargs rm" X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ea705856aeeb9429b054b7e7ebb8a60f34cac1f6;p=dak.git Use "find ... -delete" instead of "find ... | xargs rm" --- diff --git a/config/debian-security/cron.daily b/config/debian-security/cron.daily index 8b05a301..9417a856 100755 --- a/config/debian-security/cron.daily +++ b/config/debian-security/cron.daily @@ -19,7 +19,7 @@ cd $overridedir for file in override*.gz; do zcat -- "$file" > "${file%.gz}" done -find . -maxdepth 1 -mindepth 1 -type l | xargs --no-run-if-empty rm +find . -maxdepth 1 -mindepth 1 -type l -delete for suite in oldstable stable testing; do case $suite in diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index f7510a3b..6abf1b84 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -542,7 +542,7 @@ function stats() { function cleantransactions() { log "Cleanup transaction ids older than 3 months" cd $base/backup/ - find -maxdepth 1 -mindepth 1 -type f -name 'txid_*' -mtime +90 -print0 | xargs -0 --no-run-if-empty rm + find -maxdepth 1 -mindepth 1 -type f -name 'txid_*' -mtime +90 -delete } function logstats() {