[talk] Recursive chmod problem

Jonathan Drews jondrews at fastmail.com
Thu Dec 2 22:07:43 EST 2021


On Thu, Dec 02, 2021 at 09:49:38PM -0500, ori at eigenstate.org wrote:
> > $ chmod -R 660 *.pdf
> > 
> > does not change entries in directories.
> 
> of course; think about what globs expand to. Do you have
> any directories named 'dir.pdf'? if not, how would they
> show up in the glob?
> 
> 	echo chmod -R 660 *pdf
> 
> will let you see the expanded command.
> 

Interesting! I am following the instructions in a book called "The
Linux Phrasebook" and the author shows that:

$ chmod -R 660 *.jpg

will only affect images (*.jpg) and not directories. Maybe he is
wrong?

Thanks for the heads up.

--
Kind regards,
Jonathan



More information about the talk mailing list