Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to recursively scan changed files from more than 3 weeks ago with inotify, or is inotify only for starting cron jobs? What other command can I try for checking for changed files that are more than 3 weeks old?

share|improve this question

2 Answers 2

I think you may be looking for find. Inotify is more of an event mechanism for live updates, whereas find enables you to search for files based on criteria such as -cmin, -ctime, etc.

share|improve this answer

As "Jo-Erlend Schinstad" said... you can use find

Example:

find . -mtime +5 | xargs ls -l

. -> current directory (recursive search is by default)

-mtime +5 -> find all files which are older than 5 days (this is for creation time, not last change time!)

| xargs ls -l -> only for listing file detail (you can remove this)

share|improve this answer
    
when I want to check of last 31 days ( what has been modified as file ) all directories on harddisk then I type this ? : find * -type f -mtime +31 -printf '%s Byte(s)\n' >> find-modified-001.txt –  dschinn1001 Sep 12 '12 at 11:20
    
if you want to check all files just go to / or replace . with / –  Wolfy Sep 12 '12 at 11:22
    
if you want to find all files older (creation time) than 31 days you must run this: "find / -type f -mtime +31" –  Wolfy Sep 12 '12 at 12:05
    
Did my answer helped you or this is not what you wanted to do? –  Wolfy Sep 13 '12 at 7:49

Your Answer

 
discard

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

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