From: "Jesús Gabriel y Galán" Date: 2007-10-04T19:05:22+09:00 Subject: Human readable file sizes Hi, I have a list of files and I need to produce a string containing the size of each file, but in human readable format. With that I mean something like what df -h does: make an approximation to the nearest unit (B, KB, MB, GB, etc). Is this already done somewhere? This is what I have now: Find.find(folder) do |file| match = regexp.match(File.basename(file)); if match size = File.stat(file).size puts size # would like a human readable format end end Thanks, Jesus.