So, I understand the difference between the three ideas in the title.

  1. atime -- access time = last time file opened

  2. mtime -- modified time = last time file contents was modified

  3. ctime -- changed time = last time file inode was modified

So, presumably when I type something like

find ~/Documents -name '*.py' -type f -mtime 14

will find all match all files ending with .py which were modified in the last 2 weeks. Nothing shows up...

So I try

find ~/Documents -name '*.py' -type f -atime 1400

which should match anything opened within the last 1400 days (ending with .py and having type file) and still nothing.

Am I misunderstanding the documentation? Does it mean exactly 1400 days, for example?

A relevant post:

find's mtime and ctime options

4 Answers 4


Yes, -mtime 14 means exactly 14. See the top of that section in the GNU find manual (labelled "TESTS") where it says "Numeric arguments can be specified as [...]":

Numeric arguments can be specified as

+n     for greater than n,

-n     for less than n,

n      for exactly n.

Note that "less than" means "strictly less than", so -mtime -14 means "last modified at the current time of day, 13 days ago or less" and -mtime +14 means "last modified at the current time of day, 15 days ago or more".


find ~/Documents -name "*.py" -type f -mtime 14 - exactly 14 days ago

find ~/Documents -name "*.py" -type f -mtime +14 - more than 14 days ago

find ~/Documents -name "*.py" -type f -mtime -14 - less than 14 days ago

The rest in your statement seems to be correct.


These -*time statements return files which satisfy the following algorithm (where hours is how many hours ago a file was modified):


find -mtime n

int(hours/24) == n

find -mtime -n

int(hours/24) < n

find -mtime +n

int(hours/24) > n

So, for example find -mtime 1

will match files 24-47 hours old

find -mtime +0

will match files that are 24 hours old and older

We can use daystart flag for more effective

find ~/Documents -type f -iname "*.py" -daystart -mtime -14   - With in 14 days

find ~/Documents -type f -iname "*.py" -daystart -mtime -14   - greater than 14 days

find ~/Documents -type f -iname "*.py" -daystart -mtime 14   - Exactly 14 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.