Date Tags Redis

使用以下就可以了

/usr/local/bin/redis-cli -p LISTENING_PORT -a PASSWORD -h 10.0.x.xx keys  "*" | while read LINE ; do TTL=`/usr/local/bin/redis-cli -a XXXX -p LISTENING_PORT -h 10.0.x.xx ttl $LINE`; if [$TTL  -eq -1 ]; then echo "Del $LINE"; RES=`/usr/local/bin/redis-cli -a PASSWORD -p PORT -h 10.0.x.xx del $LINE`; fi; done;

参考: http://web.performancerasta.com/deleting-all-non-expiring-keys-in-a-redis-sever-from-command-line/