Debian Bug report logs -
#278842
findutils: Off-by-one error in -ctime?
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#278842; Package findutils.
(full text, mbox, link).
Acknowledgement sent to Zed Pobre <zed@debian.org>:
New Bug report received and forwarded. Copy sent to Andreas Metzler <ametzler@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
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
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux erdos 2.4.27.erdos #1 SMP Mon Aug 9 14:45:51 CDT 2004 i686
Locale: LANG=en_US, LC_CTYPE=en_US (ignored: LC_ALL set)
Versions of packages findutils depends on:
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#278842; Package findutils.
(full text, mbox, link).
Acknowledgement sent to Andreas Metzler <noreply@savannah.gnu.org>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>.
(full text, mbox, link).
Message #10 received at 278842@bugs.debian.org (full text, mbox, reply):
This mail is an automated notification from the bugs tracker
of the project: findutils.
/**************************************************************************/
[bugs #10927] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10927>
Project: findutils
Submitted by: Andreas Metzler
On: Sam 06.11.2004 at 12:09
Category: find
Severity: 5 - Average
Item Group: None
Resolution: None
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
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/
Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#278842; Package findutils.
(full text, mbox, link).
Acknowledgement sent to Andreas Metzler <ametzler@downhill.at.eu.org>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>.
(full text, mbox, link).
Message #15 received at 278842@bugs.debian.org (full text, mbox, reply):
forwarded 278842 http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=10927
tags 278842 confirmed upstream
thanks
On 2004-10-29 Zed Pobre <zed@debian.org> wrote:
> 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.
[...]
Hello,
I can confirm this (with mtime, too) and have forwared your report to
upstream.
thanks, cu and- too stupid currently to provide a fix -reas
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
Tags added: confirmed, upstream
Request was from Andreas Metzler <ametzler@downhill.at.eu.org>
to control@bugs.debian.org.
(full text, mbox, link).
Reply sent to Andreas Metzler <ametzler@logic.univie.ac.at>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Zed Pobre <zed@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #24 received at 278842-done@bugs.debian.org (full text, mbox, reply):
On Fri, Oct 29, 2004 at 12:14:28PM -0500, Zed Pobre wrote:
> 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.
Hello,
Geoff Clare <savannah-reg --AT-- gclare --DOT-- org --DOT-- uk> managed
to cluebat me with a sane explanation for that:
--------------------------
Geoff Clare in
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10927>:
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.
--------------------------
cu andreas
Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#278842; Package findutils.
(full text, mbox, link).
Acknowledgement sent to James Youngman <noreply@savannah.gnu.org>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>.
(full text, mbox, link).
Message #29 received at 278842@bugs.debian.org (full text, mbox, reply):
This mail is an automated notification from the bugs tracker
of the project: findutils.
/**************************************************************************/
[bugs #10927] Latest Modifications:
Changes by:
James Youngman <jay@gnu.org>
'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/
Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#278842; Package findutils.
(full text, mbox, link).
Acknowledgement sent to James Youngman <noreply@savannah.gnu.org>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>.
(full text, mbox, link).
Message #34 received at 278842@bugs.debian.org (full text, mbox, reply):
This mail is an automated notification from the bugs tracker
of the project: findutils.
/**************************************************************************/
[bugs #10927] Latest Modifications:
Changes by:
James Youngman <jay@gnu.org>
'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/
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Dec 23 16:36:31 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.