From 87d9fd829e46d967b505c2983a3bdc749c06d0b8 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 29 Jan 2008 00:25:28 -0300 Subject: [PATCH] Improved bin/sde-cleanup-linger to run the searches in parallel --- bin/sde-cleanup-linger | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/sde-cleanup-linger b/bin/sde-cleanup-linger index 479ff4a..88dc5ab 100755 --- a/bin/sde-cleanup-linger +++ b/bin/sde-cleanup-linger @@ -44,25 +44,26 @@ files_warn="-name DEADJOE -o -name *-[xX] \ # Remove temp/backup files # -bin/find $sderootdirs target/. -type f \( $files_remove \) | xargs rm -vf +( bin/find $sderootdirs target/. -type f \( $files_remove \) | xargs rm -vf ) & # Print warnings for 'lingering' files # -bin/find ${sderootdirs} \( \ +( bin/find ${sderootdirs} \( \ \( $files_warn -o -name '.[^.]*' \) \ -printf 'WARNING: Found %p\n' \ \) -o \( \ \( ! -type d ! -type f \) \ -printf 'WARNING: Neither a dir nor a regular file: %p\n' \ - \) + \) ) & # for targets we tolerate .files -bin/find target/. \( \ +( bin/find target/. \( \ \( $files_warn \) \ -printf 'WARNING: Found %p\n' \ \) -o \( \ \( ! -type d ! -type f \) \ -printf 'WARNING: Neither a dir nor a regular file: %p\n' \ - \) + \) ) & +wait exit 0