bugfindutils - Bugs: bug #64857, find -ctime, -cnewer etc does not...


bug #64857: find -ctime, -cnewer etc does not work

Submitter:  Siegfried Kaiser <siegfried27>
Submitted:  Sat 04 Nov 2023 05:55:46 PM UTC
Category:  find Severity:  3 - Normal
Item Group:  Test suite failure Status:  Need Info
Privacy:  Public Assigned to:  berny
Originator Name:  Siegfried Open/Closed:  Open
Release:  4.8.0 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 26 May 2024 12:24:46 PM UTC, comment #3: 

Siegfried, if you don't respond, this bug will be marked obsolete and closed.

James Youngman <jay>
Group administrator
Sun 05 Nov 2023 05:33:31 PM UTC, comment #2: 

The special thing to keep in mind is that -cnewer compares the mtime of the reference file with the ctime of the tested files.

Andreas Metzler <ametzler>
Sun 05 Nov 2023 04:42:49 PM UTC, comment #1: 

> [...] cannot use the tests [...]

This is rather brief and vague.

Please expand on:
- what did you try to do? -> test setup
- how did you try to do it? -> command line
- what was the outcome?
- what was your expectation?
Please provide a small reproducer.

Other than that, I see here that the -ctime/-atime tests are working as expected:

# CTIME: no output yet.
~/tmp> find -maxdepth 1 -type f -ctime -1

# ATIME: no output yet.
~/tmp> find -maxdepth 1 -atime -1

# Read a file -> atime should change (... usually).
~/tmp> cat LICENSE > /dev/null

# Change permission bits of the file -> ctime should change.
~/tmp> chmod 0600 LICENSE

# CTIME: works.
~/tmp> find -maxdepth 1 -type f -ctime -1

# ATIME: ...
~/tmp> find -maxdepth 1 -type f -atime -1

# oops, no output, why?
~/tmp> findmnt /home
/home /dev/sda3 ext3   rw,noatime

# -> ATIME does not work on /home (here) because it is mounted with the 'noatime' option.

# On another file system with 'relatime' instead of 'noatime' also -atime works:
/tmp/mpoint/tmp> find -maxdepth 1 -type f -atime -1

/tmp/mpoint/tmp> cat LICENSE >/dev/null

/tmp/mpoint/tmp> find -maxdepth 1 -type f -atime -1

/tmp/mpoint/tmp> findmnt /tmp/mpoint
/tmp/mpoint /dev/loop1 ext4   rw,relatime

Bernhard Voelker <berny>
Group administrator
Sat 04 Nov 2023 05:55:46 PM UTC, original submission:  

I have installed a new linuxmint with findutils 4.8.0 and cannot use the tests : cnewer , ctime -N, anewer, atime -N and so on.
Can You explain what is happening here ?
The result is always all files, not only the selected ones.

Siegfried Kaiser <siegfried27>


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

Attach Files:

Attached Files
file #55310:  x.txt added by siegfried27 (440B - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by berny (Posted a comment)
  • -email is unavailable- added by siegfried27 (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-05 berny StatusNone Need Info
        Assigned toNone berny
    2023-11-04 siegfried27 Attached File- Added x.txt, #55310

    Back to the top

    Powered by Savane 3.13-ee12.
    Corresponding source code