How to determine format of .db files
Simon Loader
simon at surf.org.uk
Mon Sep 16 18:42:51 EDT 2002
> > Sorry, I didn't express myself well. I mean what is the best way to determine
> > the format of existing db files. When converting db file with cvt_cyrusdb,
> > one has to know the format of the source files and I want to determine this
> > file format automagically.
>
> Well, if it only has to work with the current databases...
>
> Flat file should be fairly easy to recognize ('file' should be able to
> do this for you), since it is just plain text.
>
> skiplist should start with the following magic string:
> "\241\002\213\015skiplist file\0\0\0"
>
> Berkeley DB should be anything else.
wont the file command produce different answers ? Well tell you one
is data and the other is a database.
(and just for a laugh )
add to magic file.
#Cyrus skiplist file
4 string skiplist\ file Cyrus skip list
--
Simon Loader
More information about the Info-cyrus
mailing list