mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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
(cherry picked from commit a03b051f23)
This commit is contained in:
1 parent
4b0fb442dc
commit
ae99c82c76
1 file changed
+12
-9
@@ -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.
|
||||
Reference in new issue
Block a user