backslash

Jorge Almeida jjalmeida at gmail.com
Sat Jun 28 10:47:36 PDT 2008


On Thu, Jun 26, 2008 at 4:34 PM, Bill Campbell <linux-sxs at celestial.com> wrote:
> This seems to me to be a bit of a stretch (using the file system to handle
> this).  I would probably use a bsddb (Berkeley/Sleepycat) btree or hash
> file to track things like this, keying on the file name.
>
> These are simple to implement, are very fast, and can be accessed with
> python, perl, C, very easily.
>
Well, I know nothing about real databases, so I went for what I
understand! The filesystem "db" uses about 18M of disk space. Would a
real database use less space? (It's hard to imagine less overhead than
just a bunch of symlinks, but I don't know). This setup is damn fast,
to query a package owner as well as to create symlinks. I could have
made it easilly in Perl, but I chose C because I wanted to learn a
bit of C, and also to make it really lightweight.

Of course, there's the possibility of colision if some package happens
to include some file with \ in its name...

Cheers.

Jorge



More information about the Linux-users mailing list