#!/bin/bash
find /data/elasticsearch/data/kz-log/nodes/0/indices/ -type d -mtime +5 | awk -F"/" '{print $9}' | grep -v kibana | uniq >esindex.txt
cat /home/wwwad/.sh/esindex.txt | while read line
do
echo ${line}
curl -XDELETE "http://10.19.12.69:9211/${line}"
done