From: Massimiliano Mirra Date: 2002-07-03T02:19:20+09:00 Subject: Re: Question: ruby vs. ksh On Tue, Jul 02, 2002 at 10:08:25PM +0900, David Douthitt wrote: > > > chown -R user:grp dir > Except that wasn't the point (chgrp, that is). I hadn't thought > about it, but I figure that part would be easy. The important > (harder?) question is the '-R' option: recursing through the entire > directory and all subdirectories underneath it, changing the > ownership for all files. This pops out every now and then in different contexts: recursive delete, recursive copy, (and now) recursive chowning... I wonder whether a unified implementation would be possible, e.g.: recurse(dir) do |item| File.delete(item) end Find.find is very similar, though it first visits directories and then their content (preventing to delete directories), and does not change the current dir. Ideas? Massimiliano