From 6a2a5b54f54be55e55106c0f2dfdbdca50414e71 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 30 Jul 2021 09:28:26 +0000 Subject: [PATCH] document locate.mklocatedb as well tweaks by schwarze@ okay millert@ --- usr.bin/locate/locate/Makefile | 4 +- usr.bin/locate/locate/locate.mklocatedb.8 | 45 +++++++++++++++++++++++ usr.bin/locate/locate/locate.updatedb.8 | 5 ++- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 usr.bin/locate/locate/locate.mklocatedb.8 diff --git a/usr.bin/locate/locate/Makefile b/usr.bin/locate/locate/Makefile index bfd68a7e204..198b59715c8 100644 --- a/usr.bin/locate/locate/Makefile +++ b/usr.bin/locate/locate/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.13 2019/01/17 06:15:44 tedu Exp $ +# $OpenBSD: Makefile,v 1.14 2021/07/30 09:28:26 espie Exp $ # # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= locate SRCS= util.c locate.c CFLAGS+= -I${.CURDIR} -MAN= locate.1 locate.updatedb.8 +MAN= locate.1 locate.updatedb.8 locate.mklocatedb.8 SCRIPTS= updatedb mklocatedb diff --git a/usr.bin/locate/locate/locate.mklocatedb.8 b/usr.bin/locate/locate/locate.mklocatedb.8 new file mode 100644 index 00000000000..87d5f8d2d71 --- /dev/null +++ b/usr.bin/locate/locate/locate.mklocatedb.8 @@ -0,0 +1,45 @@ +.\" $OpenBSD: locate.mklocatedb.8,v 1.1 2021/07/30 09:28:26 espie Exp $ +.\" +.\" Copyright (c) 2021 Marc Espie +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 30 2021 $ +.Dt LOCATE.MKLOCATEDB 8 +.Os +.Sh NAME +.Nm locate.mklocatedb +.Nd create locate database +.Sh SYNOPSIS +.Nm +.Op Fl presort +.Sh DESCRIPTION +.Nm +reads a list of filenames (one per line) +from standard input and +creates a database usable by +.Xr locate 1 +on standard output. +It is typically run by +.Xr locate.updatedb 8 , +but it can be used independently to generate +a database from any list of paths. +.Pp +The options are as follows: +.Bl -tag -width -presort +.It Fl presort +Assume the input list is already sorted. +.El +.Sh SEE ALSO +.Xr locate 1 , +.Xr locate.updatedb 8 diff --git a/usr.bin/locate/locate/locate.updatedb.8 b/usr.bin/locate/locate/locate.updatedb.8 index 57f4438700e..228154f929d 100644 --- a/usr.bin/locate/locate/locate.updatedb.8 +++ b/usr.bin/locate/locate/locate.updatedb.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: locate.updatedb.8,v 1.18 2009/12/10 00:45:43 schwarze Exp $ +.\" $OpenBSD: locate.updatedb.8,v 1.19 2021/07/30 09:28:26 espie Exp $ .\" .\" Copyright (c) 1996 .\" Mike Pritchard . All rights reserved. @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: December 10 2009 $ +.Dd $Mdocdate: July 30 2021 $ .Dt LOCATE.UPDATEDB 8 .Os .Sh NAME @@ -85,6 +85,7 @@ default database .Sh SEE ALSO .Xr find 1 , .Xr locate 1 , +.Xr locate.mklocatedb 8 , .Xr weekly 8 .Rs .%A Woods, James A. -- 2.20.1