title: How do I list out duplicate entries in a hash?
body: <p>I'm attempting to eliminate duplicate files from a filesystem with around 12,000 decent-size (150+ MB) files. I expect 20-50 duplicates in the set.</p>
  
  <p>Rather than do a checksum on every single file, which is relatively demanding, my idea was to build a hash listing every file and its filesize, eliminate entries where the filesize is unique, and only do a checksum on the remainders, saving a lot of time.</p>
  
  <p>However I'm having a bit of trouble stripping the hash down to just the unique entries. I tried, where <code>files</code> is a hash like <code>super_cool_map.png =&gt; 1073741824,</code>:</p>
  
  <pre><code>uniques = files.values.uniq
  dupes = files.delete_if do |k,v|
    uniques.include?(v)
  end
  puts dupes
  </code></pre>
  
  <p>But that only outputs a blank hash. What should I do?</p>