Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to find all files modified before march 6 in a directory with thousands of files.

I executed the following commands in the PWD where I want to find files.

find -mtime +47 > /root/file_005.log

or

find -mtime +48 > /root/file_006.log

or

find -mtime +49 > /root/file_007.log

The problem is no matter what date filter(47,48.49.50...) is used in the find command I keep getting files with a modified date between March 8 -12 in the results.

This is the output of staton one of the problem files:

Device: 16h/22d Inode: 17 Links: 1 
Access: (0666/-rw-rw-rw-) Uid: ( 8506/ UNKNOWN) Gid: ( 5000/ UNKNOWN) 
Access: 2013-04-22 10:08:20.000000000 -0500 
Modify: 2013-03-10 03:10:20.000000000 -0500 
Change: 2013-03-10 03:10:20.000000000 -0500 

Does anyone have an idea what may be causing files that were modified after March 6 to appear in the results?

EDIT #1

  • Q: Is this a NTFS mounted filesystem or EXT3/4?
  • A: No its not. This is a drive mounted on my UNIX box using sshfs.
share|improve this question
    
Your question is unclear, -mtime +47 run today (04/22) will find files that were created before March 6th. Is your problem that you find files modified before March 6th or between March 8 -12? It should find files modified before the 6th. –  terdon Apr 22 '13 at 16:15
    
The question is quite clear "I am trying to find all files modified before march 6" ...."I keep getting files with a modified date between March 8 -12 in the results." –  user37650 Apr 22 '13 at 16:22
    
That is the results includes files modified before March 6 and files between March 8 to 12. The results should only include files modified before March 6 –  user37650 Apr 22 '13 at 16:24
    
OK, I am asking because the last sentence in your question reads Does anyone have an idea what may be causing files that were modified before March 6 to appear in the results?. I guess you meant after. Could you post the output of stat on one of the files that is wrongly returned? –  terdon Apr 22 '13 at 16:29
    
Oh Sorry. I corrected the question. –  user37650 Apr 22 '13 at 16:31
show 5 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.