bin/68848: [patch] find(1) shows pathname as optional but it isn't.
Edwin Groothuis
edwin at mavetju.org
Thu Jul 8 23:10:24 PDT 2004
>Number: 68848
>Category: bin
>Synopsis: [patch] find(1) shows pathname as optional but it isn't.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 09 06:10:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Edwin Groothuis
>Release: FreeBSD 5.2.1-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #3: Fri Feb 27 13:54:29 EST 2004 edwin at k7.mavetju:/usr/src/sys/i386/compile/k7 i386
>Description:
Find(4) and its manpage say that the pathname is optional:
[/usr/src/usr.bin/find] edwin at k7>find
usage: find [-H | -L | -P] [-EXdsx] [-f file] [file ...] [expression]
[/usr/src/usr.bin/find] edwin at k7>man find
find [-H | -L | -P] [-EXdsx] [-f pathname] [pathname ...] expression
But I haven't figured out a way to get it running without the
pathname and assume it isn't optional.
>How-To-Repeat:
[/usr/src/usr.bin/find] root at k7>find -name test
find: illegal option -- n
[/usr/src/usr.bin/find] root at k7>find -- -name test
usage: find [-H | -L | -P] [-EXdsx] [-f file] [file ...] [expression]
I think it's only fair to update the man page and the usage()
of find(4).
>Fix:
--- find.1.orig Fri Jul 9 15:58:22 2004
+++ find.1 Fri Jul 9 15:58:32 2004
@@ -45,7 +45,7 @@
.Op Fl H | Fl L | Fl P
.Op Fl EXdsx
.Op Fl f Ar pathname
-.Op Ar pathname ...
+.Ar pathname ...
.Ar expression
.Sh DESCRIPTION
The
[/usr/src/usr.bin/find] root at k7>diff -u main.c.orig main.c
--- main.c.orig Fri Jul 9 15:58:53 2004
+++ main.c Fri Jul 9 16:01:44 2004
@@ -164,6 +164,6 @@
usage(void)
{
(void)fprintf(stderr,
-"usage: find [-H | -L | -P] [-EXdsx] [-f file] [file ...] [expression]\n");
+"usage: find [-H | -L | -P] [-EXdsx] [-f pathname] pathname ... expression\n");
exit(1);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list