- use -name test before -type test to avoid calling stat(2) on every file. - use -delete instead of -exec rm to avoid forking
21 lines
466 B
Bash
Executable File
21 lines
466 B
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
echo "--------"
|
|
echo "Cleaning tutorials ..."
|
|
echo "Removing backup files"
|
|
|
|
find . \( \
|
|
-name '*~' -o -name '*.bak' \
|
|
-name core -o -name 'core.[1-9]*' \
|
|
-name '*.pvs' -o -name '*.OpenFOAM' \
|
|
\) -type f -delete
|
|
|
|
rm -f logs testLoopReport > /dev/null 2>&1
|
|
|
|
foamCleanTutorials cases
|
|
|
|
echo "--------"
|
|
|
|
#------------------------------------------------------------------------------
|