From nobody@www.freebsd.org  Wed Jun 19 09:59:11 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 1E75937B400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jun 2002 09:59:11 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g5JGxAhG006398
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jun 2002 09:59:10 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g5JGxAwU006397;
	Wed, 19 Jun 2002 09:59:10 -0700 (PDT)
Message-Id: <200206191659.g5JGxAwU006397@www.freebsd.org>
Date: Wed, 19 Jun 2002 09:59:10 -0700 (PDT)
From: Soren Spies <sspies@apple.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 'find' man page should 
X-Send-Pr-Version: www-1.0

>Number:         39532
>Category:       docs
>Synopsis:       'find' man page should
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 19 10:00:02 PDT 2002
>Closed-Date:    Thu Mar 04 04:03:47 PST 2004
>Last-Modified:  Thu Mar 04 04:03:47 PST 2004
>Originator:     Soren Spies
>Release:        FreeBSD 4.5
>Organization:
Apple Computer, Inc
>Environment:
bash-2.05$ uname -a
FreeBSD freebsd.apple.com 4.5-STABLE FreeBSD 4.5-STABLE #1: Mon Apr 22 17:41:12 PDT 2002     jkh@freebsd.apple.com:/usr/obj/usr/local/src/sys/FREEBSD  i386
>Description:
One common use of 'find' is with the -exec flag.  It's rather tricky to get right for the novice (the \; gets most people the first time) and thus would be an excellent flag to document in the find(1) man page's EXAMPLES section.

The current man pages (FreeBSD 4.5 and 4.6) don't show the \; and only obliquely refers to the need for special quoting: "Optional arguments may be passed to the utility.  The expression must be terminated by a semicolon (``;'')."
>How-To-Repeat:
man find
*think* "-exec looks cool"
try to use it: find . -type f -exec chmod g-w {} ;
find: -exec: no terminating ";"

wonder why it failed ... eventually resort to finding someone more knowledgable, general sadness, lack of confidence, etc.  :)
>Fix:
add an example to the EXAMPLES section:
        find . -type d -exec chmod g-w {} \;

>Release-Note:
>Audit-Trail:

From: Christophe Juniet <cjuniet@entreview.com>
To: freebsd-gnats-submit@FreeBSD.org, sspies@apple.com,
	cjuniet@entreview.com
Cc:  
Subject: Re: docs/39532: 'find' man page should
Date: Tue, 10 Sep 2002 12:50:10 +0200

 You can use this patch, for instance:
 
 --- patch begins here ---
 --- src/usr.bin/find/find.1     Tue Aug 27 21:14:08 2002
 +++ /home/chris/work/find.1     Tue Sep 10 12:30:20 2002
 @@ -738,6 +738,9 @@
   .It Li "find . -newerct '1 minute ago' -print"
   Print out a list of all the files whose inode change time is more
   recent than the current time minus one minute.
 +.It Li "find . -type d -exec chmod go-w \e{\e} \e;"
 +Deny write permission to group and others on the current directory
 +and all its sub-directories.
   .El
   .Sh SEE ALSO
   .Xr chflags 1 ,
 --- patch ends here ---
 
 -- 
 chris
 

From: Marc Silver <marcs@draenor.org>
To: freebsd-gnats-submit@FreeBSD.org, sspies@apple.com
Cc:  
Subject: Re: docs/39532: 'find' man page should
Date: Mon, 2 Feb 2004 19:50:27 +0000

 --qOrJKOH36bD5yhNe
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Hi there,
 
 I've made some modifications to the patch supplied:
 
   1) I personally feel the example should be something harmless.  Users
      running the previous example may find themselves in a sticky
      situation if they ran the example in the wrong directory not fully
      understanding what it does.  The example I've submitted is
      harmless.
 
   2) An example in the current man page references "." as a starting
      point, while all the others use "/".  I've changed the example to
      also use "/" as it seems more in line with the others.
 
 Cheers,
 Marc
 
 --qOrJKOH36bD5yhNe
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="find.1-patch"
 
 --- find.1-orig	Mon Feb  2 21:26:36 2004
 +++ find.1	Mon Feb  2 21:37:14 2004
 @@ -727,9 +727,13 @@
  .Dq wnj
  or that are newer than
  .Pa ttt .
 -.It Li "find . -newerct '1 minute ago' -print"
 +.It Li "find / -newerct '1 minute ago' -print"
  Print out a list of all the files whose inode change time is more
  recent than the current time minus one minute.
 +.It Li "find / -type f -exec echo {} \e\;"
 +Use the 
 +.Xr echo 1
 +command to print out a list of all the files.
  .El
  .Sh SEE ALSO
  .Xr chflags 1 ,
 
 --qOrJKOH36bD5yhNe--
Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Thu Feb 5 09:45:06 PST 2004 
Responsible-Changed-Why:  
Take this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39532 
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Fri Feb 27 12:11:13 PST 2004 
State-Changed-Why:  
Patch applied; thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39532 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Thu Mar 4 04:03:33 PST 2004 
State-Changed-Why:  
MFC Complete! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39532 
>Unformatted:
