Fedora Linux Support Community & Resources Center
Old 26th April 2012, 11:23 PM
tashirosgt Offline
Registered User
Join Date: Aug 2004
Posts: 4,037
Script or program to show recently modified files

Anyone know a good script or simple program to list all the files on the machine that have been modifed, say, in the last 10 minutes.

I'm gettng ready to configure a computer that will have both a solid state drive and a conventional hard drive in it. I want to arrange the filesystem so that files that are frequently modified reside on the conventional drive. Hence, I'd like to investigate what these files are on my current machine.


find /directory_path -mtime -1 -print

Works to get files modified in the last 24 hours, which will be good enough, I suppose.
"Never let the task you are trying to accomplish distract you from the study of computers."

Last edited by tashirosgt; 27th April 2012 at 05:47 AM.
Reply With Quote
Old 27th April 2012, 10:10 AM
marriedto51 Offline
Registered User
Join Date: Jul 2009
Location: England, UK
Posts: 969
Re: Script or program to show recently modified files

Another trick I sometimes use (though more to find out which files a given application accesses) is something like
$ touch /tmp/now
wait, or execute application
$ find /path/to/dir -newer /tmp/now -print
Reply With Quote
Old 28th April 2012, 10:29 PM
marko's Avatar
marko Offline
Registered User
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,122
Re: Script or program to show recently modified files

It would be way more efficient to register with the inotify API than to do a find. But the impact of inotify gets bigger as you encompass more of the filesystem since you have to make more and more watchers for each child directory. See "man inotify". But the big advantage of inotify is you see the file change event the instant it happens which makes it a very natural way to see file change events backwards by some amount of time (say 6 hours)

You could use python with pyinotify to do this


Last edited by marko; 28th April 2012 at 11:20 PM.
Reply With Quote

files, modified, program, recently, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
df output sorted by most recently modified? lhouk Using Fedora 0 20th January 2012 11:57 PM
Rotate Image (Script) without changing "modified" date tg3793 Using Fedora 0 19th November 2010 09:03 AM
init.d script won't show [ OK ] message. ploceus Programming & Packaging 2 10th July 2010 02:23 AM
GCC + Bash Script = Show Input? NOX020189 Using Fedora 12 1st February 2010 02:35 AM
What is a good program that can show corrupted/damaged picture files? premudriy Using Fedora 0 4th January 2010 01:08 PM

Current GMT-time: 18:35 (Monday, 25-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat