problem with find

Hi,
Iam having a strange problem, wandering if soneone can throw some lights.

I have statement

 find . -maxdepth 1 -name 'File1*.tsv' -mtime +1 -print

I expect the above statement to print the files older than 1 day or 24 hrs,

however it doesn't work that way. When issue above command, it displays only files that are greater than or equal to 2 days . I have a file which was created 25 hrs ago and I expect this command to display the file name as well.However it doesn't seem to be happening.

Why is this case ?

My requirement is to find files that ae more than 1 day / 24 hrs old.
Thnx

Take the file modification time in seconds and subtract the start time of the find program. This is the number of seconds in the past that the file was modified. Now divide by 86400 and discard any remainder. This is the number of days ago (as computed by the find command) that the file was modified. So the result you see is the expected result. You want:
-mtime +0

Don't feel bad. I only recently got this straight. The difference between "-time 0" and "-mtime +0" is counterintuitive. If you're not confused yet, think about "-mtime -0". :slight_smile:

Worked like a charm Good learning, thx Perderabo!!