Browse Source

Improved bin/sde-cleanup-linger to run the searches in parallel

karasz/new-early
Alejandro Mery 17 years ago
parent
commit
87d9fd829e
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      bin/sde-cleanup-linger

+ 6
- 5
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

Loading…
Cancel
Save