From: Robert Klemme Date: 2009-06-10T20:43:00+09:00 Subject: Re: Find out the name of a user, on a given file/dir/symlink? 2009/6/9 Marc Heiler : >> That's about as good as it gets. You can always re-open the File class >> if this is something you need on a regular basis: > > Thanks to both, I guess I will extend File for the project. I do not know how fast Etc.getpwuid is but I assume it might be slow because the information has to be retrieved via system calls and potentially grabbed from persistent storage. If you need this frequently then you might want to cache entries, e.g. USER_NAME = Hash.new {|h,uid| h[uid] = uid ? Etc.getpwuid(uid).name : ""} files.each do |f| puts f, USER_NAME[File.stat(f).uid] end Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/