id=`ls -t|grep mysql-bin.0|wc -l`

echo $id

if [[ $id -gt 50 ]];then

ls -t |grep mysql-bin.0|tail -n $(($id-50))| xargs rm -rf

fi