Examining Berkeley DB files from the CLI

前端 未结 8 1866
野趣味
野趣味 2020-12-23 12:35

I have a set of Berkeley DB files on my Linux file system that I\'d like to examine.

What useful tools exist for getting a quick overview of the contents? I can writ

8条回答
  •  再見小時候
    2020-12-23 13:13

    As mentioned in the other answers, the db-utils package (db4-utils under RHEL) has some tools. However, db_dump can be unhelpful, since the output is 'bytevalue' format.

    For a quick'n'dirty viewer, use python:

    me@machine$ python
    Python 2.7.3 (default, Sep 26 2013, 20:03:06) 
    >>> import dbhash
    >>> for k, v in dbhash.open( ** ).iteritems(): print k, v
    ...
    

    Note that dbhash is deprecated since python 2.6.

提交回复
热议问题