From: Fabio Cevasco Date: 2011-02-07T02:43:30+09:00 Subject: Re: looking for math --002354435d9ad90e06049ba0a6ca Content-Type: text/plain; charset=UTF-8 Perhaps you mean creating checksums or MD5 digests? The code is simple, assume there's a "README.textile" file in the current directory; just launch IRB and do the following: ____ ruby-1.9.2-p136 :001 > require "digest" => true ruby-1.9.2-p136 :002 > Digest::MD5.file("README.textile").to_s => "fd4964756811f1590cc13efb7ac7895a" ____ For more information, see the Digest library: http://ruby-doc.org/stdlib/libdoc/digest/rdoc/index.html Hope it helps, Fabio Cevasco ======================= web: http://www.h3rald.com twitter: http://twitter.com/h3rald On Sun, Feb 6, 2011 at 6:30 PM, soldier.coder < geekprogrammer.ed@googlemail.com> wrote: > I'm looking for code that will do some operation on a file and give me > a number that is unique to that file. if I happen to come across same > file somewhere else and the contents are the same, the same number > should be produced. > > First what is that called, and anyplace i can see code that does that? > > > --002354435d9ad90e06049ba0a6ca--