summaryrefslogtreecommitdiff
path: root/locate/locatedb.5
diff options
context:
space:
mode:
Diffstat (limited to 'locate/locatedb.5')
-rw-r--r--locate/locatedb.577
1 files changed, 15 insertions, 62 deletions
diff --git a/locate/locatedb.5 b/locate/locatedb.5
index a94905d5..7145feef 100644
--- a/locate/locatedb.5
+++ b/locate/locatedb.5
@@ -1,4 +1,4 @@
-.TH LOCATEDB 5 \" -*- nroff -*-
+.TH LOCATEDB 5L \" -*- nroff -*-
.SH NAME
locatedb \- front-compressed file name database
.SH DESCRIPTION
@@ -10,39 +10,31 @@ particular directory trees when the databases were last updated.
.P
There can be multiple databases. Users can select which databases
\fBlocate\fP searches using an environment variable or command line
-option; see \fBlocate\fP(1). The system administrator can choose the
+option; see \fBlocate\fP(1L). The system administrator can choose the
file name of the default database, the frequency with which the
databases are updated, and the directories for which they contain
entries. Normally, file name databases are updated by running the
\fBupdatedb\fP program periodically, typically nightly; see
-\fBupdatedb\fP(1).
-
-.SH GNU LOCATE02 database format
-This is the default format of databases produced by
-.BR updatedb .
-The
-.B updatedb
-program runs
-.B frcode
-to compress the list of file names using front-compression, which
-reduces the database size by a factor of 4 to 5. Front-compression
-(also known as incremental encoding) works as follows.
+\fBupdatedb\fP(1L).
+.P
+\fBupdatedb\fP runs a program called \fBfrcode\fP to compress the list
+of file names using front-compression, which reduces
+the database size by a factor of 4 to 5. Front-compression (also
+known as incremental encoding) works as follows.
.P
The database entries are a sorted list (case-insensitively, for users'
convenience). Since the list is sorted, each entry is likely to share
a prefix (initial string) with the previous entry. Each database
-entry begins with an signed offset-differential count byte, which is
-the additional number of characters of prefix of the preceding entry
-to use beyond the number that the preceding entry is using of its
+entry begins with an offset-differential count byte, which is the
+additional number of characters of prefix of the preceding entry to
+use beyond the number that the preceding entry is using of its
predecessor. (The counts can be negative.) Following the count is a
null-terminated ASCII remainder \(em the part of the name that follows
the shared prefix.
.P
If the offset-differential count is larger than can be stored in a
-signed byte (+/\-127), the byte has the value 0x80 (binary 10000000)
-and the actual count follows in a 2-byte word, with the high byte
-first (network byte order). This count can also be negative (the sign
-bit being in the first of the two bytes).
+byte (+/\-127), the byte has the value 0x80 and the count follows in a
+2-byte word, with the high byte first (network byte order).
.P
Every database begins with a dummy entry for a file called `LOCATE02',
which \fBlocate\fP checks for to ensure that the database file has the
@@ -51,37 +43,8 @@ correct format; it ignores the entry in doing the search.
Databases can not be concatenated together, even if the first
(dummy) entry is trimmed from all but the first database. This
is because the offset-differential count in the first entry of the
-second and following databases will be wrong.
-.P
-In the future, the data within the locate database may not be sorted
-in any particular order. To obtain sorted results, pipe the output of
-.B locate
-through
-.BR "sort -f" .
-.SH slocate database format
-The
-.B slocate
-program uses a database format similar to, but not quite the same as,
-GNU
-.BR locate .
-The first byte of the database specifies its
-.I security
-.IR level .
-If the security level is 0,
-.B slocate
-will read, match and print filenames on the basis of the information
-in the database only. However, if the security level byte is 1,
-.B slocate
-omits entries from its output if the invoking user is unable to access
-them. The second byte of the database is zero. The second byte is
-followed by the first database entry. The first entry in the database
-is not preceded by any differential count or dummy entry. Instead
-the differential count for the first item is assumed to be zero.
+second and following databases will be wrong.
.P
-Starting with the second entry (if any) in the database, data is
-interpreted as for the GNU LOCATE02 format.
-
-.SH Old Locate Database format
There is also an old database format, used by Unix
.B locate
and
@@ -139,15 +102,5 @@ and count bytes made printable:
(6 = 14 \- 8, and \-9 = 5 \- 14)
.fi
.SH "SEE ALSO"
-\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1),
+\fBfind\fP(1L), \fBlocate\fP(1L), \fBlocatedb\fP(5L), \fBxargs\fP(1L)
\fBFinding Files\fP (on-line in Info, or printed)
-.SH "BUGS"
-.P
-The best way to report a bug is to use the form at
-http://savannah.gnu.org/bugs/?group=findutils.
-The reason for this is that you will then be able to track progress in
-fixing the problem. Other comments about \fBlocate\fP(1) and about
-the findutils package in general can be sent to the
-.I bug-findutils
-mailing list. To join the list, send email to
-.IR bug-findutils-request@gnu.org .