<---- template headericclude ----->
Script or program to show recently modified files
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    4,174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

    Edit:

    find /directory_path -mtime -1 -print

    Works to get files modified in the last 24 hours, which will be good enough, I suppose.
    Last edited by tashirosgt; 27th April 2012 at 05:47 AM.
    "Never let the task you are trying to accomplish distract you from the study of computers."

  2. #2
    Join Date
    Jul 2009
    Location
    England, UK
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    Code:
    $ touch /tmp/now
    wait, or execute application
    $ find /path/to/dir -newer /tmp/now -print

  3. #3
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    11,404
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)

    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

    https://github.com/seb-m/pyinotify
    Last edited by marko; 28th April 2012 at 11:20 PM.

Similar Threads

  1. df output sorted by most recently modified?
    By lhouk in forum Using Fedora
    Replies: 0
    Last Post: 20th January 2012, 11:57 PM
  2. Replies: 0
    Last Post: 19th November 2010, 09:03 AM
  3. init.d script won't show [ OK ] message.
    By ploceus in forum Programming & Packaging
    Replies: 2
    Last Post: 10th July 2010, 02:23 AM
  4. GCC + Bash Script = Show Input?
    By NOX020189 in forum Using Fedora
    Replies: 12
    Last Post: 1st February 2010, 02:35 AM
  5. Replies: 0
    Last Post: 4th January 2010, 01:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]