bin/138245: find -newerXB doesn't work

David E. Cross crossd at
Thu Aug 27 20:20:02 UTC 2009

>Number:         138245
>Category:       bin
>Synopsis:       find -newerXB doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 27 20:20:01 UTC 2009
>Originator:     David E. Cross
>Release:        8.0-BETA2
FreeBSD XXXX 8.0-BETA2 FreeBSD 8.0-BETA2 #0: Mon Aug 17 13:31:29 EDT 2009     root at XXXX:/usr/obj/usr/src/sys/HPDAVID  amd64
find -newerXB is the same as find -newerXm because the if line in c_newer in function.c (in find) doesn't have a check for F_TIME2_B and just falls thtough to the default.

Create a file, try to search newer then its birth-time... touch the file, try again.. see the different results.

*** /usr/src/usr.bin/find/function.c.orig
--- /usr/src/usr.bin/find/function.c
*** 1155,1160 ****                                                              
--- 1122,1129 ----                                                              
                        new->t_data = sb.st_ctime;                              
                else if (option->flags & F_TIME2_A)                             
                        new->t_data = sb.st_atime;                              
+               else if (option->flags & F_TIME2_B)                             
+                       new->t_data = sb.st_birthtime;                          
                        new->t_data = sb.st_mtime;                              


More information about the freebsd-bugs mailing list