ksh - find examples
## ksh - find examples
## ksh_find_examples.txt

## find: files that are not of type f and not of type d and do a ls on the ones found
find . \! -type f -a \! -type d | xargs ls -l

## find: files that are of a certain age and remove them
find $EXDIR -ctime 4 -name \*dmp\.gz |xargs rm -f >/dev/null 2>&1

## find: loop to find files
find_and_remove()
{
find . -name "DBATEST*.ARC" |
while read FILE
do
   echo $FILE
   cp $FILE ND75PP`echo $FILE |cut -c10-100`
done
}
find_and_remove
exit                           

## find: and exec a command for each file found
find . -name $FILE_NAME -ctime $NUM_DAYS -exec rm -f {} \;