[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm --do-what-i-mean
From: |
Pádraig Brady |
Subject: |
Re: rm --do-what-i-mean |
Date: |
Sat, 6 May 2023 18:09:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 |
On 06/05/2023 17:47, William Bader wrote:
chmod already has an X file mode that treats directories specially. Is it worth
adding R and W modes that work similarly to X?
Well BSD, POSIX, GNU all support 'X' currently, while none yet support 'R' or
'W'.
Note POSIX says of 'X':
"The X perm symbol was adopted from BSD-based systems because it provides commonly
desired functionality when doing recursive (-R option) modifications. Similar
functionality is not provided by the find utility. Historical BSD versions of chmod,
however, only supported X with op+; it has been extended in this volume of POSIX.1-2017
because it is also useful with op=. (It has also been added for op- even though it
duplicates x, in this case, because it is intuitive and easier to explain.)"
So given 'R' and 'W' functionality is supported through find(1),
I'm not sure it warrants adding to chmod.
cheers,
Pádraig