bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30477: [PATCH] chmod chown chgrp: added --exclude-files and --exclud


From: Assaf Gordon
Subject: bug#30477: [PATCH] chmod chown chgrp: added --exclude-files and --exclude-directories
Date: Fri, 16 Feb 2018 15:16:19 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

Hello Ian,

On Thu, Feb 15, 2018 at 07:44:39PM -0500, Ian Morris Nieves wrote:
> Attached please find a new feature I created to simplify setting permissions 
> (especially recursively), which enables the user to separately target files 
> or directories.

Can you provide a concrete example/scenario where this is needed,
and find/xargs are not sufficient ?

For example, to apply chmod/chown/chgrp on files alone
(like your --exclude-directories), one can use:

  find $DIR -type f | xargs chmod [NEWMODE]

And of course, find's predicates can be expanded to include
symlinks, sockets and other conditions, and using -print0 for
safer execution.

regards,
 - assaf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]