1REDIS-CLI(1)                     User commands                    REDIS-CLI(1)
2
3
4

NAME

6       redis-cli - Redis client
7
8

SYNOPSIS

10       redis-cli [ options ] [cmd [arg [arg ...]]]
11

DESCRIPTION

13       Redis is an open source (BSD licensed), in-memory data structure store,
14       used as database, cache and message broker, found at http://redis.io/
15
16       The redis-cli command is a command line client to redis-server.
17
18

OPTIONS

20       -h hostname    Server hostname (default: 127.0.0.1).
21
22       -p port        Server port (default: 6379).
23
24       -s socket      Server socket (overrides hostname and port).
25
26       -a password    Password to use when connecting to the server.
27
28       -r repeat      Execute specified command N times.
29
30       -i interval    When -r is used, waits interval seconds per command.  It
31                      is possible to specify sub-second times like -i 0.1.
32
33       -n db          Database number.
34
35       -x             Read last argument from STDIN.
36
37       -d delimiter   Multi-bulk delimiter in for raw formatting (default: 0.
38
39       -c             Enable  cluster  mode  (follow  -ASK and -MOVED redirec‐
40                      tions).
41
42       --raw          Use raw formatting for replies (default when  STDOUT  is
43                      not a tty).
44
45       --no-raw       Force formatted output even when STDOUT is not a tty.
46
47       --csv          Output in CSV format.
48
49       --stat         Print rolling stats about server: mem, clients, ...
50
51       --latency      Enter a special mode continuously sampling latency.
52
53       --latency-history
54                      Like  --latency  but tracking latency changes over time.
55                      Default time interval is 15 sec. Change it using -i.
56
57       --latency-dist Shows latency as a spectrum, requires xterm 256  colors.
58                      Default time interval is 1 sec. Change it using -i.
59
60       --lru-test     Simulate a cache workload with an 80-20 distribution.
61
62       --slave        Simulate a slave showing commands received from the mas‐
63                      ter.
64
65       --rdb filename Transfer an RDB dump from remote server to local file.
66
67       --pipe         Transfer raw Redis protocol from stdin to server.
68
69       --pipe-timeout n
70                      In --pipe mode, abort with error if  after  sending  all
71                      data.   no  reply is received within n seconds.  Default
72                      timeout: 30. Use 0 to wait forever.
73
74       --bigkeys      Sample Redis keys looking for big keys.
75
76       --scan         List all keys using the SCAN command.
77
78       --pattern pat  Useful with --scan to specify a SCAN pattern.
79
80       --intrinsic-latency sec
81                      Run a test to measure  intrinsic  system  latency.   The
82                      test will run for the specified amount of seconds.
83
84       --eval file    Send an EVAL command using the Lua script at file.
85
86       --ldb          Used with --eval enable the Redis Lua debugger.
87
88       --ldb-sync-mode
89                      Like  --ldb  but  uses  the synchronous Lua debugger, in
90                      this mode the server is blocked and script  changes  are
91                      are not rolled back from the server memory.
92
93       --help         Output this help and exit.
94
95       --version      Output version and exit.
96
97

EXAMPLES

99       cat /etc/passwd | redis-cli -x set mypasswd
100
101       redis-cli get mypasswd
102
103       redis-cli -r 100 lpush mylist x
104
105       redis-cli -r 100 -i 1 info | grep used_memory_human:
106
107       redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3
108
109       redis-cli --scan --pattern '*:12345*'
110
111

BUGS

113       See:                     http://redis.io/support                    and
114       https://github.com/antirez/redis/issues
115
117       Copyright © 2006-2016 Salvatore Sanfilippo
118       Redistribution and use in source and binary forms, with or without mod‐
119       ification,  are  permitted  provided  that the following conditions are
120       met:
121       * Redistributions of  source  code  must  retain  the  above  copyright
122         notice, this list of conditions and the following disclaimer.
123       * Redistributions  in  binary  form  must reproduce the above copyright
124         notice, this list of conditions and the following disclaimer  in  the
125         documentation and/or other materials provided with the distribution.
126       * Neither  the  name  of Redis nor the names of its contributors may be
127         used to endorse or promote products derived from this software  with‐
128         out specific prior written permission.
129       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
130       IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT  NOT  LIMITED
131       TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC‐
132       ULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  OWNER  OR
133       CONTRIBUTORS  BE  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
134       EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT  NOT  LIMITED  TO,
135       PROCUREMENT  OF  SUBSTITUTE  GOODS  OR  SERVICES; LOSS OF USE, DATA, OR
136       PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  OF
137       LIABILITY,  WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
138       NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  OF  THE  USE  OF  THIS
139       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
140
141
142
143Redis                                2016                         REDIS-CLI(1)
Impressum