On 00:52, Thu 04 Jun 09, Steve wrote:
> I am trying to use chown -R to selectively change permissions on files.
>
> A series of files are contained in many folders under the root data folder. No
> files are stored in the data folder itself.
>
> Running
>
> chown -R user:group /data/*.dat
>
> run
> from /data generates an error indicating no files match. If I move a
> .dat
> file into /data the ownership changes in that folder but not those
> below.
>
> chown -R user:group /data/*
>
> works as expected
>
> Is there a way to selectively change files recursively ?
>
> Thanks
find /data -name '*.dat' -exec chown user:group {} \;
--
Michiel van Baak
[email protected]
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD
"Why is it drug addicts and computer aficionados are both called users?"