How to print all values in a list with redis-cli without knowing the size of the list?

17,870

You use -1 to indicate end of list so:

LRANGE key 0 -1

would print all.

Share:
17,870

Related videos on Youtube

einnocent
Author by

einnocent

Software engineer working primarily with Scala for web development and enterprise applications.

Updated on February 29, 2020

Comments

  • einnocent
    einnocent about 4 years

    In redis-cli, what is the command to print all the values in a list without knowing in advance the size of the list? I see lrange, but it requires naming the start index and the end index.

    • einnocent
      einnocent over 10 years
      Note mods: this post needs the tag redis-cli
    • d-_-b
      d-_-b over 10 years
      redis-cli is a new tag ... is it really needed to differentiate between redis and redis-cli?