From: Daniel Berger Date: 2008-11-18T03:40:01+09:00 Subject: Re: Ruby equivalent to `find . -perm -g+rw -ls` Bil Kleb wrote: > Hi, > > I can't find a Ruby equivalent to > > find . -perm -g+rw -ls > > Currently, it looks like I'll need to combine, > > File.stat(file).mode > > with something like Hal Fulton's sym2oct, > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/96956 > > hacked into Daniel Berger's file-find gem, > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/248981 > > and require 'etc' to pull out the user and group names instead of uids > and gids? > > Is there an alternative to all this yak shaving? Not at the moment, but both are excellent ideas. I've submitted them myself at: http://rubyforge.org/tracker/index.php?func=detail&aid=22854&group_id=735&atid=2912 http://rubyforge.org/tracker/index.php?func=detail&aid=22855&group_id=735&atid=2912 Supporting strings for users and groups is trivial. Supporting symbolic permissions will be more of a hassle. Regards, Dan