Skip to content

Instantly share code, notes, and snippets.

@opensourceame
Created June 9, 2020 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opensourceame/e6a78afc65536b05e4cff16e6da9710d to your computer and use it in GitHub Desktop.
Save opensourceame/e6a78afc65536b05e4cff16e6da9710d to your computer and use it in GitHub Desktop.
Useful redis command line aliases - e.g. delete keys using a wildcard / pattern
#!/bin/sh
#
# usage: redis-del-keys these:ones:*
redis-del-keys() {
redis-cli --scan --pattern $1 | xargs redis-cli del
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment