LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-07-2005, 09:58 AM   #1
dman65
Member
 
Registered: Sep 2003
Posts: 61

Rep: Reputation: 15
Most efficient way to list files changed since a specific time


I am wanting to implement a backup solution that will copy all of the files that have changed in a particular directory every 15 minutes. My first thought was to use the find command, but running the following script resulted in the output below. Basicaly it took 90 minutes to find the files that had been changed in the last 15 minutes which is a bit counter productive.

Is there something faster than find? Should I write my own C program?


<Script testfind.sh>
date
find /data1/docimg/ -mmin -15 -exec echo {} \;
date
</script>

<output>
Thu Apr 7 08:18:51 EDT 2005
/data1/docimg/
/data1/docimg/05975272.tif
/data1/docimg/05974024.tif
/data1/docimg/testfind.sh
/data1/docimg/05975414.tif
/data1/docimg/00446508.tif
/data1/docimg/00449674.tif
/data1/docimg/00449695.tif
/data1/docimg/00449013.tif
/data1/docimg/05975537.tif
/data1/docimg/05974971.tif
/data1/docimg/05975563.tif
/data1/docimg/00449750.tif
/data1/docimg/00449758.tif
/data1/docimg/05975592.tif
/data1/docimg/25050005.tif
/data1/docimg/05967185.tif
/data1/docimg/25050031.tif
/data1/docimg/05975631.tif
/data1/docimg/00448535.tif
/data1/docimg/00449129.tif
/data1/docimg/05975649.tif
Thu Apr 7 09:45:57 EDT 2005
</output>
 
Old 04-07-2005, 10:41 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Maybe something like this example...
Code:
find /home -type f -mmin -15 -exec ls {} \;
 
Old 04-07-2005, 01:19 PM   #3
dman65
Member
 
Registered: Sep 2003
Posts: 61

Original Poster
Rep: Reputation: 15
Hello Homey,

Thanks for the input, but when i tried it this was the result (It took about the same 90 minutes):


<output>
Thu Apr 7 10:57:36 EDT 2005
/data1/docimg/05975992.tif
/data1/docimg/05971584.tif
/data1/docimg/05975328.tif
/data1/docimg/testfind.sh
/data1/docimg/05962609.tif
/data1/docimg/05976244.tif
Thu Apr 7 12:24:24 EDT 2005
 
Old 04-07-2005, 01:45 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
There is something strange going on there as it doesn't take 90 minutes to find every file on my computer.
Does it act like that for any directory or just that one?
 
Old 04-07-2005, 01:52 PM   #5
dman65
Member
 
Registered: Sep 2003
Posts: 61

Original Poster
Rep: Reputation: 15
Its only on that directory, but it does have a large number of files. But when I was using NT to server those same files I had a Visual Basic program that could locate all of the files updated in the last 15 minutes in just 5 minutes.
 
  


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
HowTo add specific location into sources.list? Mathsniper Debian 1 08-28-2005 05:21 AM
Splitting audio files at specific time intervals quickfix Linux - Software 2 08-26-2005 08:18 AM
Howto list last changed files MicroSun Linux - Newbie 3 02-18-2005 06:52 PM
How to List files between date1 and date2 (range of time)? mystique98ls Linux - Newbie 2 09-10-2004 05:36 PM
Need program to find specific IP's from a list cjdock Programming 20 12-17-2003 10:08 AM


All times are GMT -5. The time now is 09:54 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