[talk] Recursive chmod problem

Jonathan Drews jondrews at fastmail.com
Thu Dec 2 22:48:01 EST 2021


On Thu, Dec 02, 2021 at 10:39:56PM -0500, ori at eigenstate.org wrote:

> 
> you have to give it a directory for it to recurse
> into a directory; the glob NEVER makes it to the
> program. The program has no idea that you ever typed
> a glob.
> 
> If you have a directory called 'foo', then:
> 
> 	chmod -R foo/
> 
> will descend into the directory recursively,
> but you need to pass the *directory* to the
> program.
> 
> 

Thanks again. I see that

chmod -R 660 *.pdf Files/

changes the premissions of the directory first and so it never enters
the directory and changes the files in it.
 I will use:

$ find . -type f -exec chmod 660 {} \;

instead. That works.

Thank you for your explanations.

--
Kind regards,

Jonathan



More information about the talk mailing list