Bug 36602

Summary: find.1 should encourage users to DTRT when piping to xargs
Product: Documentation Reporter: Joshua Goodall <joshua>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Joshua Goodall 2002-04-01 05:00:04 UTC
find.1 describes the -X option, great, but doesn't give the
DTRT solution, that is, using -print0 and then xargs -0 on the
other side of the pipe.
Comment 1 Gary W. Swearingen 2002-04-01 09:18:51 UTC
You might want to also slip xargs(1) into the "See Also" section before
someone writes a PR on it.  Its seems to be common (but debated)
practice to Also See all of the commands mentioned in other sections.
Comment 2 Joshua Goodall 2002-04-01 10:54:28 UTC
On Mon, Apr 01, 2002 at 12:18:51AM -0800, Gary W. Swearingen wrote:
> You might want to also slip xargs(1) into the "See Also" section before
> someone writes a PR on it.  Its seems to be common (but debated)
> practice to Also See all of the commands mentioned in other sections.

indeed. xargs is relevant to find in any case; find | xargs is
a common pattern.

Index: find.1
===================================================================
RCS file: /cvs/src/usr.bin/find/find.1,v
retrieving revision 1.41
diff -u -r1.41 find.1
--- find.1	20 Nov 2001 15:45:29 -0000	1.41
+++ find.1	1 Apr 2002 09:47:38 -0000
@@ -117,6 +117,12 @@
 quotes, backslash
 .Pq Dq Li \e ,
 space, tab and newline characters.
+.Pp
+However, you may wish to consider the
+.Fl print0
+primary in conjunction with
+.Ql xargs -0
+as an effective alternative.
 .It Fl d
 The
 .Fl d
@@ -732,6 +738,7 @@
 .Xr locate 1 ,
 .Xr whereis 1 ,
 .Xr which 1 ,
+.Xr xargs 1 ,
 .Xr stat 2 ,
 .Xr fts 3 ,
 .Xr getgrent 3 ,
Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2002-04-10 17:39:47 UTC
State Changed
From-To: open->patched

Applied to CURRENT, I'll apply to STABLE in 2 days, thanks for the submission! 


Comment 4 Tom Rhodes freebsd_committer freebsd_triage 2002-04-10 17:39:47 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

Applied to CURRENT, I'll apply to STABLE in 2 days, thanks for the submission!
Comment 5 Tom Rhodes freebsd_committer freebsd_triage 2002-04-12 17:18:37 UTC
State Changed
From-To: patched->closed

Patched in STABLE, thanks for the submission!