cd /usr/local/redis
vi data.txt
rpush one 1
rpush one 2
rpush one 3
:wq
yum -y install unix2dos
unix2dos -o data.txt #将换行符 \n 转换成 \r\n
cat data.txt | ./redis-cli --pipe
./redis-cli
>lrange one 0 -1
1) "1"
2) "2"
3) "3"
redis---批量插入数据
最新推荐文章于 2023-08-29 17:52:23 发布