![]() ![]() When redis-cli parses a command, whitespace characters automatically delimit the arguments. You can force human readable output when writing to a file or in You can force raw outputĮven on the terminal with the -raw option: $ redis-cli -raw INCR mycounter The output is no longer written to the terminal. Note that (integer) is omitted from the output because redis-cli detects For all other outputs it will auto-enable the raw output mode, as in the following example: $ redis-cli INCR mycounter > /tmp/output.txt ![]() Redis-cli only shows additional information for human readability when it detects the standard output is a tty, or terminal. This additional information may not be ideal when the output of redis-cli must be used as input of another command or redirected into a file. Since Redis replies are typed (strings, arrays, integers, nil, errors, etc.), you see the type of the reply between parentheses. To run a Redis command and return a standard output at the terminal, include the command to execute as separate arguments of redis-cli: $ redis-cli INCR mycounter This topic covers the different aspects of redis-cli, starting from the simplest and ending with the more advanced features. Request ASCII-art spectrogram of latency samples and frequencies.Check the latency of a Redis server and display statistics.Simulate a replica and print the replication stream it receives from the primary.To launch the program in special modes, you can use several options, including: In interactive mode, redis-cli has basic line editing capabilities to provide a familiar typing experience. It has two main modes: an interactive Read Eval Print Loop (REPL) mode where the user types Redis commands and receives replies, and a command mode where redis-cli is executed with additional arguments and the reply is printed to the standard output. The Redis command line interface ( redis-cli) is a terminal program used to send commands to and read replies from the Redis server. Overview of redis-cli, the Redis command line interface ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |