To add another spanner/clue to this.

I had several database files like this on a Solaris system. I discovered .db files are hash databases and .dir and .pag are dbms.

For example, on sendmail we have a aliases file called oddly enough, aliases which has the following format:

alias: user1 alias2: user2, user3

To create the .pag and .dir we would use:

#makemap dbm alias < alias

Which would result in aliase.pag and alias.dir being made from the alias text file.

For the .db files, the command was:

#makemap hash alias < alias

Making alias.db.

However, in attempting to get info from these files, I found typing:

#strings alias.dir
#strings aliase.pag

was a good way of just getting the ascii strings out.

Maybe you could do this, piping the output to a text file before processing in perl.

- jed

P.S: In the above the # is not to be typed, it represents the shell prompt.


In reply to Re: .pag and .dir - what db format?? by Speedfreak
in thread .pag and .dir - what db format?? by TQuid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.