38人参与 • 2025-08-02 • Redis
[root@localhost ~]# cat test_rediscli.txt hset product_1 cust_degree 1 hset product_2 cust_degree 2 hset product_3 cust_degree 3 hset product_4 cust_degree 4 hset product_5 cust_degree 5
启用pipe模式
cat test_rediscli.txt |./redis-cli -h 192.168.137.137 -p 6379 --pipe
[root@localhost ~]# ./redis-cli -h 192.168.137.137 -p 6379 192.168.137.137:6379> hgetall product_1 1) "cust_degree" 2) "1" 192.168.137.137:6379> hgetall product_2 1) "cust_degree" 2) "2" 192.168.137.137:6379> hgetall product_3 1) "cust_degree" 2) "3" 192.168.137.137:6379> hgetall product_4 1) "cust_degree" 2) "4" 192.168.137.137:6379> hgetall product_5 1) "cust_degree" 2) "5"
./redis-cli -h 192.168.137.137 -p 6379 keys "product*" |xargs ./redis-cli -h 192.168.137.137 -p 6379 del
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
您想发表意见!!点此发布评论
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。
发表评论