Last active
March 15, 2022 19:56
-
-
Save houstondapaz/bee176ef58f86314f8fc0ed8ea52ea27 to your computer and use it in GitHub Desktop.
usefull comands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- REDIS | |
-- Del keys by pattern | |
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 KEY_PATTERN* | |
or | |
EVAL "for _,k in ipairs(redis.call('keys','KEY_PATTERN*')) do redis.call('del',k) end" 0 | |
- AWK | |
-- Get all node process id | |
netstat -ltnp | awk '$7 ~ /\/node$/ {print $7}' | awk 'gsub(/\/node/,"")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To verify big keys on redis
redis-cli --bigkeys