-2

I have tried to chmod 444 for every HTML file in all sub-directories, but all files and folders were changed to 444 when I tried this command:

chmod -R 444 /home/ppp/ *.html

I just want to chmod all HTML files in /home/ppp folder and sub-folders, but not for folders and other file types.

SuperBerry
  • 1,193
  • 1
  • 12
  • 28
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Feb 19 '18 at 17:35
  • So sh script is not kind of programming? – SuperBerry Feb 21 '18 at 01:23

1 Answers1

-1

Use this command :

find /home/ppp -type f -exec chmod 444 {} \;
mbieren
  • 1,034
  • 8
  • 31