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: Wed, 24 Nov 2004 13:04:44 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Epiphany/1.2.9

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: 
                Wed 11/24/04 at 17:57 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed


------------------ Additional Follow-up Comments ----------------------------
I have updated the documentation (in CVS) to explain this more clearly.






/**************************************************************************/
[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:  None
Originator Name:  
Originator Email:  
Status:  Open
Release:  4.2.3
Fixed Release:  None


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: 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]