0

i want to delete keys with matching pattern directly from the redis-cli terminal not running cmd on bash script as given in this thread

/home/ubuntu> redis-cli -h 10.244.0.85
10.244.0.85:6379>             --> what should i type here to delete all keys with test* pattern
10.244.0.85:6379>

i am using redis-cli version 5.0.7.

moreover as given solution which is expected to work on bash shell is also not working in my case. so how to make it run in bash ?

/home/ubuntu>redis-cli -h 10.244.0.85   --scan --pattern  "{e2Manager},RAN*"  | xargs redis-cli -h 10.244.0.85 DEL 
(error) ERR wrong number of arguments for 'del' command
/home/ubuntu>
 
  • refer this: https://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-using-redis#:~:text=If%20you%20want%20to%20atomically,some_host_name%5D%20EVAL%20%22return%20redis. – Suchandra T Apr 15 '23 at 13:16

0 Answers0