472,353 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Change on file

Your mail has been scanned by InterScan MSS.

I was thinking about use md5 check to se if a file had changes since last
check. Am I correct?
Is there any other light method?


Oct 24 '06 #1
5 1076
Fulvio enlightened us with:
I was thinking about use md5 check to se if a file had changes since
last check. Am I correct?
You can do that, but a check on the mtime (os.stat) would be a lot

Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Oct 24 '06 #2
You could use ctime to see it by the time.

MD5 it's a most secure way to a file that CAN'T be modified. If you
just want to see if the file has been modified (like to make a cache),
use ctime.

Oct 24 '06 #3
Il Tue, 24 Oct 2006 19:47:43 +0800, Fulvio ha scritto:

I was thinking about use md5 check to se if a file had changes since last
check. Am I correct?
Is there any other light method?
It's OK, but if you have a lot of files to check and they're large, and
changes frequent, it could put the system under severe workload.

If you just need to know if a file has changed, you can check via
date/time, or if you don't trust somebody who's got access to it (because
he could have manually altered the datetime) you could go for a simpler
algorithm, like sfv.

Alan Franzoni <al***************@gmail.com>
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
Oct 24 '06 #4
Your mail has been scanned by InterScan MSS.
On Tuesday 24 October 2006 20:22, Alan Franzoni wrote:
it could put the system under severe workload.
Thank you for the enlightment :-)
In my case it's meant to check a couple of files, but no more than 10 Mbytes.
The most purpose is to find differences since last check. I suppose it's a
good way, as other programs using CRC as comparison between file, better than
byte-to-byte diff. Also CD images and big files download are giving a MD5
My point stand as platform indipendent solution and won't take extra fancy
modules which aren't part of python package itself. I'll look at SVF and
timestamp options. I'm less actracted by the idea of 'stat' on the file, Now
I'm on linux and I've some doubt about win32 options.

PS. C'e' la MList per iclp?

Oct 25 '06 #5
Fulvio <fu****@tm.net.mywrites:
Your mail has been scanned by InterScan MSS.
Fulvio, something between your fingers and the Python mailing list is
causing this to appear at on *every* message you send to this list.

Please do whatever you need to do to make it stop. It's unwelcome and

\ "In prayer, it is better to have a heart without words than |
`\ words without heart." -- Mahatma Gandhi |
_o__) |
Ben Finney

Oct 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Max | last post by:
Hi, What is the best way to change passwords via php? I was first thinking of using the chpasswd function, but even though I added an entry...
by: Sami | last post by:
I keep getting the famous 'Too Many Connection' Error, and don't know how to change my variables, so they persist even if i have to restart mysql...
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a...
by: david | last post by:
When you right click on a file in windows, there is a property of type of file, which seems to associate this file with an application for it. For...
by: Joel D Kraft | last post by:
I'm using controls in my ASP.NET application from a couple of vendors. Between the vendors and thier versioning, I've set up subfolders under my bin...
by: Dom | last post by:
I get an InvalidOperationException with the message "The resource class for this page was not found. Please check if the resource file exists and...
by: miladhatam | last post by:
can i change the size of a file dynamically ? for example have 100 Kb and i want to decrease it to 20 Kb thanks
by: Jon Slaughter | last post by:
Can I modify code that I have included using <?php include("../Index.php"); ?> The Index.php file contains links that need to be modified to...
by: PSiegmann | last post by:
Hello group, if I open with streamreader a file to read in that way: StreamReader sr = new StreamReader(c:\\test.txt,...
by: Michael Bray | last post by:
I've found a change in SP1 that doesn't seem to make sense to me, but seems to be there nonetheless. The situation is this... I have an...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.