0

How to delete keys with pattern having redis-cli password?

Records i needs to remove:

redis-cli -p 6379 -a password KEYS "/st_files/281/*" | wc -l
9

I want to remove the values under /st_files/281/* Which has count 9.

My redis setup has password.

Redis version is 3.2.3
I tried:

redis-cli -p 6379 -a pssword KEYS "/st_files/281/*" | xargs redis-cli DEL

Result is:

(error) NOAUTH Authentication required.

Password i entered is the correct one.

1 Answers1

1

Try:

redis-cli -a pssword KEYS "/st_files/281/*" | xargs redis-cli -a pssword DEL
Itamar Haber
  • 47,336
  • 7
  • 91
  • 117
  • I want to delete entries from **1** to **288**. Total it's **350** [ /st_files/**355**/* ] How can i do in a single command? – Vivek Sathisan May 08 '18 at 04:18