|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
| #
551f4b47 |
| 21-Jan-2024 |
Ricardo Branco <[email protected]> |
find: Add -readable, -writable & -executable options
Reviewed by: jhb, Mina Galić Pull Request: https://github.com/freebsd/freebsd-src/pull/1080
(cherry picked from commit e4b646ce16105efc943bc8ac2
find: Add -readable, -writable & -executable options
Reviewed by: jhb, Mina Galić Pull Request: https://github.com/freebsd/freebsd-src/pull/1080
(cherry picked from commit e4b646ce16105efc943bc8ac2242a2220dfe18d8)
show more ...
|
| #
1aebbbc6 |
| 15-Jan-2024 |
Ricardo Branco <[email protected]> |
find: Allow '/' to be used with -perm for GNU compatibility
In 2005, Gnu find deprecated '+' as the leading character for the -perm argument, instead preferring '/' with the same meaning. Implement
find: Allow '/' to be used with -perm for GNU compatibility
In 2005, Gnu find deprecated '+' as the leading character for the -perm argument, instead preferring '/' with the same meaning. Implement that behavior here, and document it in the man page.
Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1060
(cherry picked from commit 2a121b97e9673ff37062c9fa026eee969940d2e2)
show more ...
|
|
Revision tags: release/14.0.0 |
|
| #
1d386b48 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0 |
|
| #
b422540a |
| 01-Jul-2018 |
Eitan Adler <[email protected]> |
find(1): deLINTify
|
|
Revision tags: release/11.2.0 |
|
| #
c3a6ea5b |
| 06-Feb-2018 |
Alex Richardson <[email protected]> |
Allow compiling usr.bin/find on Linux and Mac
When building FreeBSD the makefiles invoke find with various flags such as `-s` that aren't supported in the native /usr/bin/find. To fix this I build t
Allow compiling usr.bin/find on Linux and Mac
When building FreeBSD the makefiles invoke find with various flags such as `-s` that aren't supported in the native /usr/bin/find. To fix this I build the FreeBSD version of find and use that when crossbuilding.
Inserting lots if #ifdefs in the code is rather ugly but I don't see a better solution.
Reviewed By: brooks (mentor) Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D13306
show more ...
|
| #
d8a0fe10 |
| 29-Dec-2017 |
Conrad Meyer <[email protected]> |
find(1): Fix -newer and -samefile to conform to POSIX[0]
By default, or with the -P flag, find(1) should evaluate paths "physically." For symlinks, this means using the link itself instead of the ta
find(1): Fix -newer and -samefile to conform to POSIX[0]
By default, or with the -P flag, find(1) should evaluate paths "physically." For symlinks, this means using the link itself instead of the target.
Historically (since the import of BSD 4.4-lite from CSRG), find(1) has failed to refer to the link itself, at least for -newer and -samefile.
[0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html
PR: 222698 Reported by: Harald Schmalzbauer <bugzilla.freebsd AT omnilan.de> Sponsored by: Dell EMC Isilon
show more ...
|
| #
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier f
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
| #
0ab69d71 |
| 11-Nov-2017 |
Xin LI <[email protected]> |
find(1): Don't treat statfs() error as fatal in f_fstype, which can happen when a directory is removed in the middle of find.
Instead of a full err(), allow find to continue, plus print a warning wi
find(1): Don't treat statfs() error as fatal in f_fstype, which can happen when a directory is removed in the middle of find.
Instead of a full err(), allow find to continue, plus print a warning with exitstatus set when appropriate.
Reported by: 100.chksetuid via gordon Reviewed by: jilles MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D13024
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
fbbd9655 |
| 28-Feb-2017 |
Warner Losh <[email protected]> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <[email protected]> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
26ac9660 |
| 18-Apr-2016 |
Marcelo Araujo <[email protected]> |
Use NULL instead of 0 for pointers.
MFC after: 2 weeks.
|
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0 |
|
| #
599df3ef |
| 08-Oct-2014 |
Ed Maste <[email protected]> |
Correct scale factor for T terabyte suffix
PR: 194250 MFC after: 3 days Sponsored by: The FreeBSD Foundation
|
|
Revision tags: release/9.3.0 |
|
| #
2545695e |
| 13-Apr-2014 |
Christian Brueffer <[email protected]> |
Avoid double free in f_acl().
CID: 1018508 Found with: Coverity Prevent(tm) MFC after: 1 week
|
| #
b547523e |
| 13-Apr-2014 |
Jilles Tjoelker <[email protected]> |
find: Return normal exit status from -quit.
If there was an error, make the exit status reflect this even if -quit caused the exit. Formerly, -quit always caused exit(0).
GNU find does the same.
|
| #
7a79617c |
| 12-Apr-2014 |
Jilles Tjoelker <[email protected]> |
find: Correctly propagate -exec/-execdir ... {} + exit status.
As per POSIX, the -exec ... {} + primary always returns true, but a non-zero exit status causes find to return a non-zero exit status i
find: Correctly propagate -exec/-execdir ... {} + exit status.
As per POSIX, the -exec ... {} + primary always returns true, but a non-zero exit status causes find to return a non-zero exit status itself. GNU does the same, and also for -execdir ... {} +.
It does not make much sense to return false from the primary only when the child process happens to be run.
The behaviour for -exec/-execdir ... ; remains unchanged: the primary returns true or false depending on the exit status, and find's exit status is unaffected.
show more ...
|
| #
cf599562 |
| 16-Mar-2014 |
Jilles Tjoelker <[email protected]> |
find: When performing -quit, finish pending -exec ... + command lines.
This avoids unexpected partial processing when a find command uses both -quit and -exec ... +.
GNU find does the same.
MFC af
find: When performing -quit, finish pending -exec ... + command lines.
This avoids unexpected partial processing when a find command uses both -quit and -exec ... +.
GNU find does the same.
MFC after: 1 week
show more ...
|
|
Revision tags: release/10.0.0 |
|
| #
b95de98a |
| 11-Jan-2014 |
Jilles Tjoelker <[email protected]> |
find: Allow -type d without statting everything.
fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into them).
No functional change is intended, but find commands that use -type
find: Allow -type d without statting everything.
fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into them).
No functional change is intended, but find commands that use -type d but no primaries that still require stat/lstat calls make considerably fewer system calls.
show more ...
|
| #
e810bef7 |
| 05-Jan-2014 |
Jilles Tjoelker <[email protected]> |
find: Fix two more problems with -lname and -ilname:
* Do not match symlinks that are followed because of -H or -L. This is explicitly documented in GNU find's info file and is like -type l.
* Fi
find: Fix two more problems with -lname and -ilname:
* Do not match symlinks that are followed because of -H or -L. This is explicitly documented in GNU find's info file and is like -type l.
* Fix matching symlinks in subdirectories when fts changes directories.
Also, avoid some readlink() calls on files that are obviously not symlinks (because of fts(3) restrictions, not all of them).
MFC after: 1 week
show more ...
|
| #
3e02329a |
| 05-Jan-2014 |
Jilles Tjoelker <[email protected]> |
find: Fix -lname and -ilname.
The code did not take into account that readlink() does not add a terminating '\0', and therefore did not work reliably.
As before, symlinks of length PATH_MAX or more
find: Fix -lname and -ilname.
The code did not take into account that readlink() does not add a terminating '\0', and therefore did not work reliably.
As before, symlinks of length PATH_MAX or more are not handled correctly. (These can only be created on other operating systems.)
PR: bin/185393 Submitted by: Ben Reser (original version) MFC after: 1 week
show more ...
|
|
Revision tags: release/9.2.0 |
|
| #
9d6d5a71 |
| 02-Aug-2013 |
Jilles Tjoelker <[email protected]> |
find: Allow -delete to delete files given as arguments.
Formerly, a command like find dir1/dir2 -delete would delete everything under dir1/dir2 but not dir1/dir2 itself.
When -L is not specified an
find: Allow -delete to delete files given as arguments.
Formerly, a command like find dir1/dir2 -delete would delete everything under dir1/dir2 but not dir1/dir2 itself.
When -L is not specified and "." can be opened, the fts(3) code underlying find(1) is careful to avoid following symlinks or being dropped in different locations by moving the directory fts is currently traversing. If a problematic concurrent modification is detected, fts will not enter the directory or abort. Files found in the search are returned via the current working directory and a pathname not containing a slash.
For paranoia, find(1) verifies this when -delete is used. However, it is too paranoid about the root of the traversal. It is already assumed that the initial pathname does not refer to directories or symlinks that might be replaced by untrusted users; otherwise, the whole traversal would be unsafe. Therefore, it is not necessary to do the check for fts_level == FTS_ROOTLEVEL.
Deleting the pathnames given as arguments can be prevented without error messages using -mindepth 1 or by changing directory and passing "." as argument to find. This works in the old as well as the new version of find.
Tested by: Kurt Lidl Reviewed by: jhb
show more ...
|
|
Revision tags: release/8.4.0 |
|
| #
ddd956b0 |
| 17-Mar-2013 |
Jilles Tjoelker <[email protected]> |
find: Include nanoseconds when comparing timestamps of files.
When comparing to the timestamp of a given file using -newer, -Xnewer and -newerXY (where X and Y are one of m, c, a, B), include nanose
find: Include nanoseconds when comparing timestamps of files.
When comparing to the timestamp of a given file using -newer, -Xnewer and -newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the comparison.
The primaries that compare a timestamp of a file to a given value (-Xmin, -Xtime, -newerXt) continue to compare times in whole seconds.
Note that the default value 0 of vfs.timestamp_precision almost always causes the nanoseconds part to be 0. However, touch -d can set a timestamp to the microsecond regardless of that sysctl.
MFC after: 1 week
show more ...
|
| #
9ed0c92c |
| 03-Mar-2013 |
David Malone <[email protected]> |
Add an option for finding sparse files.
Reviewed by: iedowse MFC after: 3 weeks
|
| #
17ef6d3a |
| 10-Feb-2013 |
Jilles Tjoelker <[email protected]> |
find: Run when cwd cannot be opened, except with -execdir or -delete.
fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when the current directory cannot be opened. Therefore, do
find: Run when cwd cannot be opened, except with -execdir or -delete.
fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when the current directory cannot be opened. Therefore, do not make a failure to open the current directory (for returning to it later in -exec) fatal.
If -execdir or -delete are used, the expectation is that fts(3) will use chdir to avoid race conditions (except for -execdir with -L). Do not break this expectation any more than it already is by still failing if the current directory cannot be opened.
show more ...
|
| #
bc626176 |
| 10-Feb-2013 |
Jilles Tjoelker <[email protected]> |
find: In -execdir ... {} +, only pass one file per invocation.
This is inefficient but ensures that -execdir ... {} + does not mix files from different directories in one invocation; the command cou
find: In -execdir ... {} +, only pass one file per invocation.
This is inefficient but ensures that -execdir ... {} + does not mix files from different directories in one invocation; the command could not access some files. Files from the same directory should really be handled in one invocation but this is somewhat more complicated.
show more ...
|
|
Revision tags: release/9.1.0 |
|
| #
40072dc2 |
| 25-Jul-2012 |
Jilles Tjoelker <[email protected]> |
find: Implement real -ignore_readdir_race.
If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a file after find has read its name from a directory are ignored.
Formerly, -ignore
find: Implement real -ignore_readdir_race.
If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a file after find has read its name from a directory are ignored.
Formerly, -ignore_readdir_race did nothing.
PR: bin/169723 Submitted by: Valery Khromov and Andrey Ignatov
show more ...
|
|
Revision tags: release/8.3.0_cvs, release/8.3.0, release/9.0.0 |
|
| #
6ab780e5 |
| 13-Jun-2011 |
Tai-hwa Liang <[email protected]> |
Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype comparsion as nullfs will copy f_type from underlayer FS.
PR: bin/156258 Submitted by: Marcin Wisnicki <mwisnicki+freebs
Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype comparsion as nullfs will copy f_type from underlayer FS.
PR: bin/156258 Submitted by: Marcin Wisnicki <[email protected]> MFC after: 1 month
show more ...
|