Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

redis delete keys that match pattern

redis-cli --scan --pattern users:* | xargs redis-cli del

# Or if you have a cluster:
redis-cli --scan --pattern users:* | xargs -L redis-cli -c del
Comment

redis delete keys by pattern

This one is working for big number of keys: 
EVAL "local keys = redis.call('keys', ARGV[1]) 
 for i=1,#keys,5000 do 
 redis.call('del', unpack(keys, i, math.min(i+4999, #keys))) 
 end 
 return keys" 0 prefix:*
Comment

PREVIOUS NEXT
Code Example
Shell :: copy ssh key directly window 
Shell :: find and delete files with extension linux 
Shell :: docker force a rebuild 
Shell :: ubuntu zip 
Shell :: undo local commit 
Shell :: git clone and change the folder name 
Shell :: make mp4 smaller using ffmpeg 
Shell :: node latest version ubuntu 
Shell :: bash grep find lines that start with word 
Shell :: minikube without sudo 
Shell :: git compare two branches with meld 
Shell :: How to remove a snap package on Ubuntu 
Shell :: install next js 
Shell :: como instalar paquetes tar.gz en ubuntu 
Shell :: ubuntu install mathpix 
Shell :: how to switch branch 
Shell :: xsltproc linux install 
Shell :: GREPCC token 
Shell :: react natibe debugger 
Shell :: how to download grub with pop os 
Shell :: conda install opencv 
Shell :: git amend 
Shell :: Package "ngx-material-file-input" 
Shell :: install vpn client for ubuntu 20.04 gui 
Shell :: how to run a command on startup in linux ubuntu or centos 
Shell :: powershell foreach 
Shell :: debian install postgresql 
Shell :: restart wsl2 windows 10 
Shell :: grep search for string in directory 
Shell :: ubuntu setting not showing 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =