bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #10927] '-ctime +1' produces output that would be correct for '-ct


From: James Youngman
Subject: [bugs #10927] '-ctime +1' produces output that would be correct for '-ctime +2'
Date: Sun, 05 Dec 2004 12:25:21 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

This mail is an automated notification from the bugs tracker
 of the project: findutils.

/**************************************************************************/
[bugs #10927] Latest Modifications:

Changes by: 
                James Youngman <address@hidden>
'Date: 
                Sun 12/05/04 at 17:18 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
         Assigned to | None                      | jay
              Status | Open                      | Closed
       Fixed Release | None                      | 4.2.9


------------------ Additional Follow-up Comments ----------------------------
You can download a release of findutils in which this problem is
fixed from ftp://alpha.gnu.org/gnu/findutils.

The releases on alpha.gnu.org are for testing purposes, so please
take the time to download the release and verify that your
problem has been solved.  Once the release has been sufficiently
tested, it can be uploaded to ftp.gnu.org for everybody to use it.







/**************************************************************************/
[bugs #10927] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10927>
Project: findutils
Submitted by: Andreas Metzler
On: Sat 11/06/04 at 12:09

Category:  find
Severity:  5 - Average
Item Group:  None
Resolution:  Fixed
Privacy:  Public
Assigned to:  jay
Originator Name:  
Originator Email:  
Status:  Closed
Release:  4.2.3
Fixed Release:  4.2.9


Summary:  '-ctime +1' produces output that would be correct for '-ctime +2'

Original Submission:  This is Debian Bug #278842, reported by Zed Pobre
<http://bugs.debian.org/278842>:

------------------------
Package: findutils
Version: 4.1.20-4
Severity: normal

Using -ctime +1 and -cmin +1440 should produce identical behaviour,
unless I completely misread the manpage, but this isn't actually the
case.  Using -ctime +1 appears to be identical to -cmin +2880, or
greater than two days old, not one.  Using -ctime +0 appears to be
identical to -cmin +1440.

erdos:/tmp> find . -maxdepth 1 -ctime +0 | wc -l
139
erdos:/tmp> find . -maxdepth 1 -ctime +1 | wc -l
97
erdos:/tmp> find . -maxdepth 1 -cmin +0 | wc -l
457
erdos:/tmp> find . -maxdepth 1 -cmin +1440 | wc -l
139
erdos:/tmp> find . -maxdepth 1 -cmin +2880 | wc -l
97
-----------------

I've tested against latest CVS code (2004-11-06T12:44:58+0100) and the behavior 
is identical to 4.1.20, afaict "find -Xtime +Y" is broken (X in c, m, a), it  
really is off by one.
         thanks, cu andreas

Follow-up Comments
------------------


-------------------------------------------------------
Date: Sun 12/05/04 at 17:18         By: James Youngman <jay>
You can download a release of findutils in which this problem is
fixed from ftp://alpha.gnu.org/gnu/findutils.

The releases on alpha.gnu.org are for testing purposes, so please
take the time to download the release and verify that your
problem has been solved.  Once the release has been sufficiently
tested, it can be uploaded to ftp.gnu.org for everybody to use it.


-------------------------------------------------------
Date: Wed 11/24/04 at 17:57         By: James Youngman <jay>
I have updated the documentation (in CVS) to explain this more clearly.

-------------------------------------------------------
Date: Wed 11/10/04 at 13:35         By: Andreas Metzler <ametzler>
Thank you Geoff for the perfect explanation.

Jay, please close this report.
            thanks, cu andreas

-------------------------------------------------------
Date: Tue 11/09/04 at 12:19         By: Geoff Clare <geoffclare>
find is behaving correctly.  The numbers specified for -ctime refer to whole 
days; fractions of days do not count.  I.e. in "-ctime +1" the +1 means "the 
number of whole days is more than 1".  For the number of whole days to be more 
than 1 it must be at least 2, and 2 days is 2880 minutes.

The fact that fractional days do not count is clear from the POSIX description, 
which says:

"-ctime  n
The primary shall evaluate as true if the time of last change of file status 
information subtracted from the initialization time, divided by 86400 (with any 
remainder discarded), is n."

Thus "-ctime +1" means the result of the division by 86400 (with any remainder 
discarded) is more than 1.




CC List
-------

CC Address                          | Comment
------------------------------------+-----------------------------
278842 --AT-- bugs --DOT-- debian --DOT-- org | Debian-BTS









For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10927>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]