Created
October 2, 2013 18:20
-
-
Save simeonwillbanks/6798170 to your computer and use it in GitHub Desktop.
Redis Bulk Operations #redis #xargs #wc #unix
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
# Count all keys which match a wildcard from database 1 | |
redis-cli -n 1 KEYS "foo:*" | wc -l | |
# Delete all keys which match a wildcard from database 1 | |
redis-cli -n 1 KEYS "foo:*" | xargs redis-cli -n 1 DEL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment