使用 curl 和 xargs 命令批量删除 ES索引,并将一些不想删除的索引过滤出来

curl http://localhost:9200/_cat/indices | awk '{print $3}' | egrep -v 'xx|xx|xx' | xargs -n 1 -I {} curl -XDELETE http://localhost:9200/{}
原文地址:https://www.cnblogs.com/1q94/p/14098533.html