This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chown --recursive [OWNER][:[GROUP]] ... doesn't work


On 06/08/2013 12:50 PM, Corinna Vinschen wrote:
> On Jun  8 17:47, Vasiliy wrote:
>> chown --recursive <owner> *.* doesn't change ownership for all files,
> 
> Wrong pattern.  *.* doesn't match files without dot.  Try
> 
>   chmod -R * .*

Umm, that changes .. and its children, too, which is probably not what
you want. That, and long command lines can be problematic if the glob
expands to too much, you might have issues if there are no matches the
glob, and you have problems if any files begin with '-'.

Better is:

chmod -R owner .

and let chmod do the recursion over all files in '.' itself without
having to worry about how to glob all of them.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]