我要评分
获取效率
正确性
完整性
易理解

Commands get and scan

Prerequisites

Before running following commands, create a target database or ensure that a database has been created. For details about how to create a database, see 2.

Procedure

  1. Go to the /home directory.
    cd /home
  2. Use ldb to run the get command to view the values of specified keys.
    ldb  --db=/home/rocksdb/rkdb get k5
    ldb  --db=/home/rocksdb/rkdb get k3

  3. Use ldb to run the scan command to scan all data in the database.

    The following command is the simplest form of the scan command. If the data volume in your database is large, you are not advised to scan all data and display it in the command output. Instead, you can specify the key range of the data to be scanned. For details about the control parameters, see the scan command description in Commands Supported by ldb.

    ldb  --db=/home/rocksdb/rkdb scan