[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

magic numbers for GNU findutils locate database

From: James Youngman
Subject: magic numbers for GNU findutils locate database
Date: Mon, 24 Jan 2005 09:34:35 +0000
User-agent: Mutt/1.3.28i


Here are the magic numbers for the database used by the "locate"
program of GNU findutils.  The tests are compatible with the "file"
command from ftp.astron.com, which is used in Debian GNU/Linux, among
other places.

I'm not sure if my use of "\b" is legitimate, but it follows existing
examples in the magic file.

0       string  \0LOCATE        GNU findutils locate database data
>7      string  >\0             \b, format %s
>7      string  02              \b (frcode)

Eventually, later versions of GNU findutils may change the database
format.  The format number is the two-digit string at offset 7, and so
these magic numbers will continue to work with those.  

The "old" database format doesn't have any handy magic strings that I
can see could be used to identify it, unfortunately.  However, I
suspect that it is rarely used these days, except on systems that
don't have GNU findutils at all.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]