1

How can I search files modified in a specific day ?

1
  • man find -- find <path> -mtime <n> where n is the number of days to that specific day
    – bjoernz
    Dec 2, 2010 at 8:54

2 Answers 2

2

Figure out how many days ago that was, and use it without a sign in -mtime.

2
 touch --date "2010-11-01" /tmp/foo(some temp file which is not important)
 touch --date "2010-11-02" /tmp/foo2(some temp file which is not important)
 find /some_folder -newer /tmp/foo ! -newer /tmp/foo2

This gives you the files in some_folder which are modified newer than or the same date to "2010-11-01" and not newer than "2010-11-02".

2
  • You forgot to create a second file with a date a day later and invert the search on it. Dec 2, 2010 at 9:05
  • I've fixed it and added a newer date boundary.
    – miette
    Dec 2, 2010 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .