bugfindutils - Bugs: bug #20139, -mtime -2 includes -mtime 2

 
 

bug #20139: -mtime -2 includes -mtime 2

Submitted by:  Andreas Metzler <ametzler>
Submitted on:  Sun 10 Jun 2007 08:30:33 AM UTC  
 
Category: findSeverity: 4 - Important
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.3.3Fixed Release: 4.3.9

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 14 Jun 2007 09:37:31 AM UTC, comment #1:

Fixed in CVS. The relevant patch is attached.

The earliest release affected by this problem is 4.3.3.

(file #13046)

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 10 Jun 2007 08:30:33 AM UTC, original submission:

-mtime +n behaves different in 4.2.x than in 4.3.7. The older version
interprets -n as lower than, 4.3.7 as lower or equal:

(SID)ametzler@argenau:/tmp/findtest$ ls -l ; date
total 0
-rw-rw-r-- 1 ametzler ametzler 0 Jun 3 22:00 2007-06-04
-rw-rw-r-- 1 ametzler ametzler 0 Jun 4 22:00 2007-06-05
-rw-rw-r-- 1 ametzler ametzler 0 Jun 5 22:00 2007-06-06
-rw-rw-r-- 1 ametzler ametzler 0 Jun 6 22:00 2007-06-07
-rw-rw-r-- 1 ametzler ametzler 0 Jun 7 22:00 2007-06-08
-rw-rw-r-- 1 ametzler ametzler 0 Jun 8 22:00 2007-06-09
-rw-rw-r-- 1 ametzler ametzler 0 Jun 9 22:00 2007-06-10
Sun Jun 10 08:24:32 GMT 2007

Now 4.2.30:
(SID)ametzler@argenau:/tmp/findtest$ find --version
GNU find version 4.2.31
Built using GNU gnulib version 2007-02-24
(SID)ametzler@argenau:/tmp/findtest$ find -mtime +2
./2007-06-07
./2007-06-05
./2007-06-04
./2007-06-06
(SID)ametzler@argenau:/tmp/findtest$ find -mtime -2
.
./2007-06-10
./2007-06-09
(SID)ametzler@argenau:/tmp/findtest$ find -mtime 2
./2007-06-08

OTOH 4.3.7:
(SID)ametzler@argenau:/tmp/findtest$ /tmp/FIND/findutils-4.3.7/find/find --version
GNU find version 4.3.7
Built using GNU gnulib version 2007-05-26
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() CBO(level=0)
(SID)ametzler@argenau:/tmp/findtest$ /tmp/FIND/findutils-4.3.7/find/find -mtime +2
./2007-06-07
./2007-06-05
./2007-06-04
./2007-06-06
(SID)ametzler@argenau:/tmp/findtest$ /tmp/FIND/findutils-4.3.7/find/find -mtime -2
.
./2007-06-10
./2007-06-09
./2007-06-08
(SID)ametzler@argenau:/tmp/findtest$ /tmp/FIND/findutils-4.3.7/find/find -mtime 2
./2007-06-08

Note how ./2007-06-08 is listed in 4.3.7's output.

cu andreas

Andreas Metzler <ametzler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #13046:  sv-bug-20139.patch added by jay (2KiB - text/x-patch - Bugfix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jay (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Nov 2007 07:41:53 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.9
    Thu 14 Jun 2007 09:37:31 AM UTCjayAttached File-=>Added sv-bug-20139.patch, #13046
      Severity3 - Normal=>4 - Important
      StatusNone=>Fixed
      Assigned toNone=>jay
      Release4.3.7=>4.3.3
      Fixed Release4.3.7=>None
    Sun 10 Jun 2007 08:31:09 AM UTCametzlerCarbon-CopyRemoved 20807=>-

    Back to the top


    Powered by Savane 3.1-cleanup1