LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-15-2007, 09:48 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Is there a way to find recently created/edited files without using find?


I'm writing a little app that goes through a directory and reports disk usage based on user, folder, file type, age, etc.

A typical root of a search will contain 100K files or so, so it's very expensive to do the search. I cache all the data between requests, so all subsequent requests are super fast, but the problem is how to update the cache, preferably without searching through the entire file structure again, when a new file is added or a file is modified.

Does there exist some way of seeing what new files were added? I imagine it would be somewhat low level - something like how df can report disk usage in an instant (granted, I know df doesn't care about individual files, so I can't use the same mechanism... just wondering if something similar exists).

Any ideas other than adding monitoring tools which is almost definitely not an option.
 
Old 10-15-2007, 09:59 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,445

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
Have a look at inotify - this might be worth a read.
 
Old 10-15-2007, 10:41 PM   #3
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by syg00 View Post
Have a look at inotify - this might be worth a read.
Very interesting. Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find out which files increase most recently? jimmyjiang Linux - Server 1 12-11-2006 11:57 AM
find command : finding files that are created within last 24 hours Fond_of_Opensource Linux - Newbie 1 11-06-2006 04:47 AM
Find all files created or modified between 2 times MicahCarrick Linux - Software 3 06-29-2006 05:22 PM
How do I find the program that I recently installed? pxumsgdxpcvjm Linux - Newbie 6 02-18-2006 06:13 PM
Using FIND to locate files created between certain dates billybobjoe1984 Programming 6 07-23-2005 07:07 PM


All times are GMT -5. The time now is 01:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration