-daystart the manual says:
Measure times from the beginning of today rather than from 24 hours
ago. So, to list the regular files in your home directory that
were modified yesterday, do
find ~/ -daystart -type f -mtime 1
The '-daystart' option is unlike most other options in that it has
an effect on the way that other tests are performed. The affected
tests are '-amin', '-cmin', '-mmin', '-atime', '-ctime' and
'-mtime'. The '-daystart' option only affects the behaviour of any
tests which appear after it on the command line.
What that means that if you run:
find . -daystart -mtime 1
on the day after the winter changing time (2015-10-25 in Europe this year), that should give you the files last modified between
2015-10-25 01:00 (the first occurrence of that time) and
If run as
find . -daystart -mtime 0
on 2015-10-25, you'd expect it to get you the files modified between 00:00 and 22:59:59, but doing a simple test (with findutils 4.4.2) shows that it returns files modified between the first 01:00 and 23:59:59 (unless run before the time change).
$ find . -printf '%TFT%TT %p\n'
$ NO_FAKE_STAT=1 faketime -m '2015-10-25 12:23' find . -daystart -mtime 0
$ NO_FAKE_STAT=1 faketime -m '2015-10-25 00:32' find . -daystart -mtime 0
$ NO_FAKE_STAT=1 faketime -m '2015-10-25 12:23' find . -daystart -mtime 1
In any case the statement So, to list the regular files in your home directory that were modified yesterday above is not always true.
-daystart, the check is for files modified in units of 24 hours. So if run at
12:43 on 2015-10-25,
find . -mtime 0 would give you files modified between 2015-10-24 13:43 and now.
A more reliable way to give you the files that were last modified yesterday would be:
find . -newermt 'yesterday 0' ! -newermt 'today 0'
Note that it includes the files that were last modified today at 00:00:00.0000000000 and not the ones at that time yesterday. Unfortunately there's no
age function to use in globs like:
$ autoload age # in ~/.zshrc
$ ls -ld -- *(age,yesterday,)
has similar issues.