XP is just a number | |
PerlMonks |
Re: XMD5 and Net::FTPby flexvault (Monsignor) |
on Oct 14, 2014 at 11:06 UTC ( [id://1103712]=note: print w/replies, xml ) | Need Help?? |
I think you have your answer about using MD5 stamps, but you are adding a lot of CPU work to find out that a file has changed ( or not ) and you are not guaranteed that the MD5 will be different. A few years ago, I took 400K files and did MD5 of each file and then sorted the results. I found that many different files had the exact same MD5. MD5 is great for determining that 2 files are the same, but not necessarily that they are different. YMMV. To get the results I needed, I used the 'find' command with the '-newer' option to build my list of files to backup. Immediately after the 'find', I would 'touch' a file for getting my base target for the next 'find' cycle. Unfortunately, depending on long the 'find' took to execute, sometimes I would miss a file, and so I changed the file timestamp to exactly the same time that the 'find' started each cycle. Just giving you some thoughts before you finish your design. Also look at 'rsync' for some ideas. Good Luck! Regards...Ed "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|