GNU bug report logs - #30477
[PATCH] chmod chown chgrp: added --exclude-files and --exclude-directories

Previous Next

Package: coreutils;

Reported by: Ian Morris Nieves <inieves <at> alumni.cmu.edu>

Date: Fri, 16 Feb 2018 00:52:01 UTC

Severity: wishlist

Tags: patch, wontfix

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 30477 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Ian Morris Nieves <inieves <at> alumni.cmu.edu>
Cc: 30477 <at> debbugs.gnu.org
Subject: Re: bug#30477: [PATCH] chmod chown chgrp: added --exclude-files and
 --exclude-directories
Date: Fri, 16 Feb 2018 15:16:19 -0700
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




This bug report was last modified 6 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.