macos系统安装
# 安装
$ brew install rocksdb
# 使用命令
$ rocksdb_ldb
$ rocksdb_sst_dump
linux系统安装
找到rocksdb仓库:Releases · facebook/rocksdb · GitHub
找到对应版本的二进制,比如:https://github.com/facebook/rocksdb/archive/refs/tags/v6.10.1.tar.gz
下载文件
wget https://github.com/facebook/rocksdb/archive/refs/tags/v6.10.1.tar.gz
解压文件
tar -xzvf v6.10.1.tar.gz
进入文件夹
cd rocksdb-6.10.1/
清理上次编译
make uninstall
编译工具
make ldb sst_dump
工具用法(常用命令参考)
./sst_dump --file=1-5809.sst --show_properties
./sst_dump --file=1-5809.sst --command=scan --output_hex --read_num=1
./sst_dump --file=/home/toc/SME/1-11083.sst --command=scan --output_hex | wc -l