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:  find Severity:  4 - Important
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Open/Closed:  Closed
Release:  4.3.3 Fixed 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 Files:
   
   
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
  • -email is unavailable- added by jay (Updated the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-11 jay Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.3.9
    2007-06-14 jay Attached 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
    2007-06-10 ametzler Carbon-CopyRemoved 20807 => -

    Back to the top


    Powered by Savane 3.3