From 545d4a42d60bfedee2c6013c0bf6a03f54e01969 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Sat, 18 Mar 2023 09:37:53 +0000 Subject: [PATCH] [doc] describe history of find, xargs and locate. To: findutils-patches@gnu.org --- doc/find.texi | 87 ++++++++++++++++++++++++++++++++++++++++++++------- find/find.1 | 21 +++++++++++++ xargs/xargs.1 | 9 ++++++ 3 files changed, 105 insertions(+), 12 deletions(-) diff --git a/doc/find.texi b/doc/find.texi index e43eede7..cad90100 100644 --- a/doc/find.texi +++ b/doc/find.texi @@ -77,6 +77,7 @@ A copy of the license is included in the section entitled * Worked Examples:: Examples demonstrating more complex points. * Security Considerations:: Security issues relating to findutils. * Error Messages:: Explanations of some messages you might see. +* History:: History of find, xargs and locate. * GNU Free Documentation License:: Copying and sharing this manual. * Primary Index:: The components of @code{find} expressions. @end menu @@ -91,15 +92,11 @@ principal programs that you use to perform these tasks are this manual use capabilities specific to the GNU versions of those programs. -GNU @code{find} was originally written by Eric Decker, with -enhancements by David MacKenzie, Jay Plett, and Tim Wood. GNU -@code{xargs} was originally written by Mike Rendell, with enhancements -by David MacKenzie. GNU @code{locate} and its associated utilities -were originally written by James Woods, with enhancements by David -MacKenzie. The idea for @samp{find -print0} and @samp{xargs -0} came -from Dan Bernstein. The current maintainer of GNU findutils (and this -manual) is James Youngman. Many other people have contributed bug -fixes, small improvements, and helpful suggestions. Thanks! +@ref{History} for a history of @code{find}, @code{locate} and +@code{xargs}. The current maintainers of GNU findutils (and this +manual) are Bernhard Voelker and James Youngman. Many other people +have contributed bug fixes, small improvements, and helpful +suggestions. Thanks! To report a bug in GNU findutils, please use the form on the Savannah web site at @@ -5052,9 +5049,9 @@ use @code{make} to update the timestamps: @smallexample makefile=$(mktemp) find subdir \ - \( \! -xtype l \) \ - -newer timestamp \ - -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile" + \( \! -xtype l \) \ + -newer timestamp \ + -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile" make -f "$makefile" rm -f "$makefile" @end smallexample @@ -5857,6 +5854,72 @@ error messages, but none seem to be candidates for guidance. If you are having a problem understanding one of these, ask for help on @email{bug-findutils@@gnu.org}. + +@node History +@chapter History + +@section History of @code{find} + +A @code{find} program appeared in Version 5 Unix as part of the +Programmer's Workbench project and was written by Dick Haight. Doug +McIlroy's @cite{A Research UNIX Reader: Annotated Excerpts from the +Programmer’s Manual, 1971-1986} provides some additional details; you +can read it on-line at +@url{https://www.cs.dartmouth.edu/~doug/reader.pdf}. + +GNU @code{find} was originally written by Eric Decker, with +enhancements by David MacKenzie, Jay Plett, and Tim Wood. The idea +for @samp{find -print0} and @samp{xargs -0} came from Dan Bernstein. + +@section History of @code{xargs} + +The @code{xargs} program was invented by Herb Gellis at Bell Labs. In +his own words: + +@quotation +Hi James, Thanks for reaching out. Yes I invented @code{xargs} way +back before we even released UNIX to the general public when it was +running on PDP-11 machines with little memory, and capable shell +programs were not there yet - kind of like early IBM PC-DOS command +lines. The name came about, first, by noticing at the time there were +no commands beginning with @samp{x} (silly reason, I know), and then +came up with, basically, "eXecute command with ARGumentS". This +obviously allowed one to process files, sequentially, including +batches of files, while the UNIX command line buffer was very tiny. I +don't remember exactly how small but possibly only 512 bytes. The very +first use intended was to allow compiling C programs that were broken +into many small routines whose total name length would exceed the +command line buffer. Hope this settles the matter! Oh, another arcane +factoid about @code{xargs} at the beginning was that I was able to +keep it smaller than 4k (I think that was the amount) which at the +time was the maximum size of a file segment on PDP-11/UNIX, so that +the program could be loaded completely on the first segment, without +having to go back and get chains of further segments - Hence fast! +@end quotation + +GNU @code{xargs} isn't derived from the original Bell Labs program. +It was originally written by Mike Rendell, with enhancements by David +MacKenzie. + +@section History of @code{locate} + +4.3-BSD introduced the @dfn{fast-find} feature, in which the command +@code{find needle} would look for a file named @samp{needle}. This +took advantage of the fact that, at the time, there was no valid +two-argument @code{find} invocation. The implementation was much +faster than searching the whole file system in real time, because it +used a pre-built file name database. This functionality is described +in more detail in @cite{Finding Files Fast} by James Woods (Usenix +;login, Volume 8 Issue 1, pages. 8-10, 1983). + +Standardisation of @code{find} led to this functionality being moved +into the @code{locate} program in 4.4-BSD. The command @code{find +needle} now unambiguously means ``start searching at the file +@code{needle} and print the names of the files you encounter''. + +GNU @code{locate} and its associated utilities were originally written +by James Woods, with enhancements by David MacKenzie. + @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi diff --git a/find/find.1 b/find/find.1 index 544778e4..671e3260 100644 --- a/find/find.1 +++ b/find/find.1 @@ -2606,6 +2606,27 @@ or may not have been performed. . .SH "HISTORY" + +A +.B find +program appeared in Version 5 Unix as part of the +Programmer's Workbench project and was written by Dick Haight. Doug +McIlroy's +.I A Research UNIX Reader: Annotated Excerpts from the Programmer’s Manual, 1971-1986 +provides some additional details; you can read it on-line at +. + +GNU +.B find +was originally written by Eric Decker, with +enhancements by David MacKenzie, Jay Plett, and Tim Wood. The idea +for +.B find -print0 +and +.B xargs -0 +came from Dan Bernstein. +. +.SH "COMPATIBILITY" As of findutils-4.2.2, shell metacharacters (`*', `?' or `[]' for example) used in filename patterns match a leading `.', because IEEE POSIX interpretation 126 requires this. diff --git a/xargs/xargs.1 b/xargs/xargs.1 index 87450992..de6fbc69 100644 --- a/xargs/xargs.1 +++ b/xargs/xargs.1 @@ -415,6 +415,15 @@ is that small. The option can be used to discover the actual limits in force on the current system. . +.SH "HISTORY" + +The +.B xargs +program was invented by Herb Gellis at Bell Labs. +See the Texinfo manual for findutils, +.IR "Finding Files" , +for more information. +. .SH "BUGS" It is not possible for .B xargs -- 2.30.2