public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: cygwin@cygwin.com
Subject: Re: chown --recursive [OWNER][:[GROUP]] ... doesn't work
Date: Wed, 25 May 2016 08:44:00 -0000	[thread overview]
Message-ID: <5744F8BE.5090502@redhat.com> (raw)
In-Reply-To: <20130608185039.GB9607@calimero.vinschen.de>

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2016-05-25  0:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-08 15:47 Vasiliy
2013-06-08 16:06 ` Ruby L. V. Lammert
2013-06-08 18:50 ` chown --recursive [OWNER][:[GROUP]] ... doesn't work Corinna Vinschen
2016-05-25  8:44   ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5744F8BE.5090502@redhat.com \
    --to=eblake@redhat.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).