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

Re: Bash script problem



On Fri, 6 Aug 2021 at 10:01, Polyna-Maude Racicot-Summerside
<debian@polynamaude.com> wrote:
> On 2021-08-05 7:30 p.m., David wrote:
> > On Fri, 6 Aug 2021 at 06:03, Gary L. Roach <garyroach719@gmail.com> wrote:

> > 'chmod -R' is less useful because it does not discriminate
> > between files and directories, I never understood why it
> > does not offer that option, because usually we need all file
> > permissions to not be the same as all directory permissions.
> >
> find . -type d -exec chmod -v 0644 '{}' \;
>
> to change the folder
>
> find . -type f -exec chmod -v 0755 '{}' \;
>
> to change files
>
> Here's how to discriminate

Perhaps I wasn't clear.
I wasn't asking for an alternative method.

I was commenting on how I have always been puzzled why
someone made the effort to give 'chmod' an '-R' option, but
never made it actually useful for common cases. As it is,
it seems that it's really only useful for modifying the write attribute.


Reply to: