0

How is find daystart used with mmin? daystart with mtime makes perfect sense, But with mmin its confusing.

Let me explain what I do not get:

  • find path -daysart -mtime 0 gives files modified today.
  • find path -daystart -mtime 1 gives files modified yesterday.

How to get files modified today with daystart and mmin?

Also how to find files modified between 23:59 and 12:00 using daystart option and mmin?

J. Chomel
  • 8,193
  • 15
  • 41
  • 69
Naren
  • 49
  • 1
  • 8
  • Vote to close - this belongs to superuser or Unix&Linux, as it's not a programming question, but a usage question about a standard unix command. – tink Jun 05 '17 at 20:32

1 Answers1

1

On how to use mmin:

If you try to find what files were modified (m in mmin) between 2 and 6 minutes ago:

find path -mmin +2 -mmin -6

to use it with -daystart

daystart option set the plot at the beginning of today. So if you want files modified between the beginning of today and 12:00, you need to know how long ago 12:00 was. Let's say it is 14:00, so it was 120 minutes ago:

find path -daystart -mmin -120

Maybe this site will be of help for you.

J. Chomel
  • 8,193
  • 15
  • 41
  • 69