linux - redis-cli do a ttl command with a pattern -


i want display ttl of keys have in redis @ once redis-cli shell.

i tried things

redis-cli keys * | xargs redis-cli ttl  

but it's not working, keep getting error:

(error) err wrong number of arguments 'ttl' command 

if you're using bash, careful globbing on "*". also, xargs need replace-string this:

redis-cli keys '*' | xargs -i{} redis-cli ttl {} 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -