I am pleased to announce the release of version 4.6.0 of GNU findutils. GNU findutils is a set of software tools for finding files that match certain criteria and for performing various operations on them. Findutils includes the programs "find", "xargs" and "locate". More information about findutils is available at http://www.gnu.org/software/findutils/. This is a "stable" release of findutils. It can be downloaded from ftp://ftp.gnu.org/pub/gnu/findutils/findutils-4.6.0.tar.gz. The ftp.gnu.org site is very busy, so you may find it more convenient to download findutils from one of the mirror sites listed at http://www.gnu.org/order/ftp.html. Version 4.6.0 is based on a series of development releases (4.5.x). All the changes and bugfixes since the previous stable release (4.4.2) are summarised below. Some of the bugs listed as fixed may not have existed in any previous stable release; that is, some bugs listed as fixed may have been introduced and then fixed during the lifetime of the 4.5.x development releases. Bugs in GNU findutils should be reported to the findutils bug tracker at http://savannah.gnu.org/bugs/?group=findutils. Reporting bugs via the web interface will ensure that you are automatically informed when the bug has been fixed. General discussion of findutils takes place on the bug-findutils mailing list. To join the 'bug-findutils' mailing list, send email to
. To verify the GPG signature of the release, you will need the public key of the findutils maintainer, James Youngman. You can download this from http://savannah.gnu.org/users/jay. * Major changes in release 4.6.0, 2015-MM-DD ** Summary 1. Some backward-incompatible changes have been made to find: - egrep regular expressions now work like GNU grep -E - Minor changes to the way nanoseconds fields are printed - find -perm +mode is now fully POSIX compliant (if you want the old behaviour use -perm /mode). 2. Some backward-incompatible changes have been made to xargs: - if the child exits with status 126 or 127, xargs exits with status 123. 3. There are also a large number of bugfixes, performance enhancements and documentation improvements. 4. The "oldfind" binary is no longer installed. The changes are described in further detail below: ** Changes to find ** Removal of the recursive implementation of find The oldfind binary used to be a recursive implementation, using one file descriptor and at least 100 bytes of stack per nested subdirectory. This binary is still built but is no longer installed. The configure option --without-fts is no longer accepted (it's recognised but only --with-fts is allowed). *** Regular Expressions Using "-regextype egrep" now has the same effect as "-regextype posix-egrep". This is the result of a change to gnulib to bring it into line with GNU grep (see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20974#22). The behaviour of the "awk", "posix-awk" and "gnu-awk" regular expression types selected by the -regextype option also have slightly changed, to bring them into line with the behaviour of the GNU C library. For "awk", character classes (such as [[:digit:]]) are now supported. For "gnu-awk" and "posix-awk", intervals are supported and invalid interval specifcations are treated as literals (for example 'a{1' is treated as 'a\{1'). *** SELinux SELinux is now supported. Thanks to Miloslav Trmac and Kamil Dudka. *** -perm The obsolete GNU extension "find ... -perm +MODE", which was withdrawn in release 4.2.21 in 2005 due to compatibility problems, has been completely removed. Use "find ... -perm /MODE" instead. The GNU extension "find ... -perm /MODE" is no longer disabled when the POSIXLY_CORRECT environment variable is set. *** -printf For find -printf, the format specifiers %{, %[ and %( are all now reserved for future use. Previously these would print {, [ and ( respectively, but in any case those characters can just be printed literally like this: find -printf "{[(". Code changes intended to explain that these are reserved went into findutils-4.5.5, but this code had, before now, had no effect. When expanding "-printf '%F'", find reads /etc/mtab. We now take the last match found in this file, rather than the first, to better deal with implementations which have duplicate entries (for example /proc/mounts on systems running the Linux kernel). *** -ok and -okdir If the POSIXLY_CORRECT environment variable is set, the system's definition of "yes" and "no" responses are used to interpret the response to questions from -ok and -okdir. The default is still to use information from the findutils message translations. *** Warnings When the POSIXLY_CORRECT environment variable is set, a warning is no longer issued when '/' is found in the argument to -name. Use of POSIXLY_CORRECT also turns off warnings about use of the deprecated option -d and the use of global options in surpising positions. ** Functional Changes to xargs *** Default Command If no utility is specified, xargs now calls "echo" (and searches on $PATH to find it) rather than "/bin/echo". This may give rise to subtle behaviour differences for users having more than one echo binary. To avoid unexpected surprises, just explicitly specify the utility you would like to run. For example use "xargs /bin/echo < foo" rather than "xargs < foo". *** System Limits If xargs find that exec fails because the argument size limit it calculated is larger than the system's actual maximum, it now adapts by passing fewer arguments (as opposed to failing). Similarly, xargs now handles the case where the system's actual exec limits are smaller than the value of ARG_MAX at compile time. Very few platforms normally have this property, but it is possible to configure some Unix systems this way. *** Exit Status When the utility invoked from xargs exits with status 126 or 127, xargs exits with status 123. This means that exit status values 126 and 127 now unambigously mean that the utility could not be run or could not be found, respectively. *** Parallel Execution You can now increase the parallelism of xargs in mid-run by sending it SIGUSR1, and decrease the parallelism with SIGUSR2. A new option is provided, --process-slot-var. If you set this, xargs will set the indicated environment variable in each child. The values are re-used, but no executing child process will have the same value as another executing child process. ** Performance Changes to find The find program will once again build argument lists longer than 1 with "-execdir ...+". The upper limit of 1 argument for execdir was introduced as a workaround in findutils-4.3.4. The limit is now removed, but find still does not issue the maximum possible number of arguments, since an exec will occur each time find encounters a subdirectory (if at least one argument is pending). If you use the -fstype FOO predicate and specify a filsystem type FOO which is not known (e.g. present in /etc/mtab) at the time find starts, that predicate is now equivalent to -false. This substitution currently occurs at optimisation level 2 and above. *** Optimization The default optimisation level for find is now -O2 instead of -O0, meaning that a number of additional optimisations are performed by default. Current optimisations at each level are: 0: Perform -name, -path, -iname, -ipath before other checks. 1: Expressions containing only cost-free tests are evaluated before expressions which contain more costly tests. 2: Bring forward all tests that need to know the type of a file but don't need to stat it. 3: All tests are ordered by their estimated cost. Cost here is simply an estimate of how time consuming the I/O operations needed to make a test are. *** Calling stat fewer times File type information is also passed back from fts to find, saving calls to the stat system call for find command lines which don't need the stat information. This provides a performance improvement for common cases like "find . -type d". The ftsfind executable (which is built by default as "find") now calls fts() in such a way that it avoids calling stat() on directory entries, if it doesn't need the information. This can produce a significant speedup on filesystems which don't populate the d_type element of struct dirent, for example reiserfs. Anecdotal evidence suggests this can speed updatedb up from about 30 minutes to 3-4 minutes. The ftsfind executable also now avoids calling stat() functions to discover the inode number of a file, if we already read this information from the directory. This does provide a speed-up, but only for a restricted set of commands such as "find . -inum 4001". This fix is listed below as bug #24342. *** Large Directories Find now uses less heap memory when processing directories containing very many files. Changes to gnulib's fts code should provide performance improvements in find when processing very large directories (for example directories containing significantly more than 10000 filenames). Performance imporvements may only exist for some find command lines (performance testing was done for the fts implementation itself but we haven't done the analogous performance tests in find). ** Documentation Changes The Texinfo manual now includes a small number of references to further reading on security. *** Documentation Changes for find If you use -type or -xtype with a type letter corresponding to a file type which is not supported by the system on which find was compiled, find will now give a clearer error message (though the functionality is unchanged). Type letters are affected are D, l and p (for Solaris Doors, symbolic links and named pipes respectively). The documentation for find -execdir now describes correctly that the command will be executed in the same directory as the file we were considering at the time. The documentation previously (and incorrectly) stated that the original working directory of find would be used. Both the Texinfo manual and the find manual page now include a more precise description of how your locale configuration affects the interpretation of regular expressions and how your response to prompts from the -ok action are interpreted. *** Documentation Changes for xargs The output of xargs --help has been slightly changed for greater clarity. The documentation for xargs now warns about parallel processes (xargs -P) sharing stdout. ** Translations There are now message translations for Norwegian Bokmaal, Czech and Lithuanian. ** Bug Fixes xargs now waits for a running process before prompting in interactive mode (-p). When the -a option of xargs is used, xargs no longer leaks a file descriptor (fixing a bug reported by Kyle Sallee). On some systems without support for a boolean type (for example some versions of the AIX C compiler), find's regular expression implementation fails to support case-insensitive regular expression matching, causing -iregex to behave like -regex. This is now fixed. A large number of bugs from the Savanah bug tracker (https://savannah.gnu.org/bugs/?group=findutils) have also been fixed: #46715: testsuite error with perl 5.22, gnulib outdated #45780: inode column is badly aligned when running 'find