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
Post a Comment