Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Last active March 1, 2022 06:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yusufhm/360380799ef93ae5575e1360decbb4f8 to your computer and use it in GitHub Desktop.
redis commands
# Get info.
redis-cli INFO
# DB size.
redis-cli DBSIZE
# Get real-time stats.
redis-cli --stat
# Monitor.
redis-cli MONITOR
# Get list of all keys.
redis-cli --scan --pattern '*'
# Get list of keys by pattern.
redis-cli --scan --pattern laravel_database_*
# Delete list of keys by pattern.
redis-cli --scan --pattern laravel_database_* | xargs redis-cli unlink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment