Find files based on modified date(specifying the exact hour)

My question is:

How to find files that has been modified from a given date(specifying the exact hour) to another given date(specifying the exact hour) in a given directory, from / for example.

I think that can be achieved with find.

Does anyone know how to do this┬┐? Thank you in advance

Asked By: aDoN

||

I think you can do it with below:

find ./* -mtime -10 -mtime +4 -ls
Answered By: Pankaj

The basic structure of the find command looks like this:

# find <paths> <filters> <actions>

find / -mtime -10 -mtime +4

find has + and - operators that work with the mtime, atime and ctime options:

atime == Access Time
mtime == Modified Time
ctime == Change Time

You can read inode with -*time and define intervals for your times via + and/or -

Answered By: PersianGulf

go for this one:

find . -newermt "2013-01-01 00:00:00" ! -newermt "2013-01-02 00:00:00"

m The modification time of the file reference

t reference is interpreted directly as a time

Answered By: Petr
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.