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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -