Monthly Archives: December 2011

Show Duplicate Filenames with Ruby

Here’s a quick one. I want to show just the names of files that have the same basename in a directory. Code require ‘find’ require ‘set’ all_files  = [] duplicates = {} basenames  = Set.new ARGV.each do |dir|   Find.find … Continue reading

Posted in ruby | Tagged , , , | Leave a comment