File zkCleanTRX.sh of Package zookeeper

#!/bin/bash

ZK_DIR=${1:-"/var/lib/zookeeper"}
FILES=$(find $ZK_DIR -type f -size 0)
COUNT=$(echo $FILES | wc -w)

if [ $COUNT -ge 1 ]; then
    echo "Removing ${FILES} as 0-length TRX files"
    rm -rf $FILES
else
    echo "No 0 TRX files found"
fi