On Thu, Jun 4, 2009 at 5:13 AM, Woodchuck <[email protected]> wrote:
> On Thu, Jun 4, 2009 at 3:52 AM, Steve <[email protected]> wrote:
> something with find(1).
>
> Try
> find /data -name "*.dat" -exec chown user:group {} \;
>
> But understand it first. Understand the quoting. man find.
>
> Dave
I should add that this and related solutions have the desired
property of doing what you say you want to do -- change the ownership
of certain files named *.dat -- but they do not change the ownership
of the various directories in the tree. So to anticipate the next post,
"Now the new owners can't read/delete/get-a-ls the .dat files!!", you may need
to change the permissions on the directories. How to do that is left
as an exercise, hint man find (-type d) and man chmod.
Dave
--
Caution, this account is hosted by gmail.
Strangers scan the content of all mail transiting such accounts.