bug-findutils
[Top][All Lists]
Advanced

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

Re: Excluding future-dated files in 'find' on Cygwin


From: Andreas Metzler
Subject: Re: Excluding future-dated files in 'find' on Cygwin
Date: Fri, 13 Oct 2023 16:54:30 +0200

On 2023-10-13 Backwoods BC <completely.and.totally.trash@gmail.com> wrote:
[...]
> find ./ -mtime +0 -mtime -1

> but this found nothing. When I changed it to:

> find ./ -mtime 0 -mtime -1

> it worked as desired and found all files less than a day old and not
> future-dated.

> Can someone tell me, please, if this is a bug or the expected behaviour.

It is expected behavior. See the fine manual:

Test: -atime n
Test: -ctime n
Test: -mtime n

    True if the file was last accessed (or its status changed, or it was
    modified) n*24 hours ago. The number of 24-hour periods since the
    file’s timestamp is always rounded down; therefore 0 means “less
    than 24 hours ago”, 1 means “between 24 and 48 hours ago”, and so
    forth. Fractional values are supported but this only really makes
    sense for the case where ranges (‘+n’ and ‘-n’) are used.

    cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



reply via email to

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