locate.1: clarify bytes vs. characters

The database stores bytes, not characters. Remove the historical
note about 7-bit storage. Also document that -i ignores case only
for ASCII letters.

Reviewed by: ziaee
MFC after: 3 days
This commit is contained in:
Wolfram Schneider committed 2026-10-24 10:12:05 +00:00
1 parent a3d1d4e88a
commit a03b051f23
1 file changed
+12 -9
+12 -9
View File
@@ -1,4 +1,4 @@
.\" Copyright (c) 1995 Wolfram Schneider <[email protected]>. Berlin.
.\" Copyright (c) 1995-2026 Wolfram Schneider <[email protected]>
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd December 11, 2020
.Dd October 22, 2026
.Dt LOCATE 1
.Os
.Sh NAME
@@ -70,17 +70,16 @@ As a special case, a pattern containing no globbing characters
is matched as though it were
.Dq *foo* .
.Pp
Historically, locate only stored characters between 32 and 127.
The
current implementation stores any character except newline
The database can store any byte in a path name except newline
.Pq Sq \en
and
.Dv NUL
.Pq Sq \e0 .
The 8-bit character support does not waste extra space for
plain ASCII file names.
Characters less than 32 or greater than 127
are stored in 2 bytes.
Bytes with values from 32 to 127
.Pq printable ASCII characters and DEL
are stored in at most one byte;
all other bytes take two bytes.
For example, a two-byte UTF-8 character takes four bytes in the database.
.Pp
The following options are available:
.Bl -tag -width 10n
@@ -159,6 +158,7 @@ Note: you can only use
pattern for stdin.
.It Fl i
Ignore case distinctions in both the pattern and the database.
Only ASCII letters are folded.
.It Fl l Ar number
Limit output to
.Ar number
@@ -266,3 +266,6 @@ a locate database which was built on SunOS/sparc machine
The
.Nm
utility does not recognize multibyte characters.
The
.Fl i
option ignores case only for ASCII letters.