473,396 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Change on file

***********************
Your mail has been scanned by InterScan MSS.
***********************
Hello,

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?

F

Oct 24 '06 #1
5 1114
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
easier.

Sybren
--
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:
Hello,

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
check.
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?

F
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
obnoxious.

--
\ "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

3
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 for apache to be able to run chpassword vi visudo,...
2
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 service. Platform: Windows 2003 Server My...
5
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 different name specific to my application. I know...
2
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 example, when you double click on a .doc file, the...
2
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 directory: bin bin\Infragistics\v5.2...
1
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 try again." when I change the resource file of a...
8
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
27
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 work. Index.php is basically an html file uses a...
1
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, System.Text.Encoding.GetEncoding(10000)); Is it possible that it can...
0
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 application that stores it's configuration in a file in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.