[英]How to chmod all files in sub-directories without chmod the folders?
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:我曾尝试为所有子目录中的每个 HTML 文件 chmod 444,但是当我尝试此命令时,所有文件和文件夹都更改为 444:
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.我只想修改 /home/ppp 文件夹和子文件夹中的所有 HTML 文件,而不是文件夹和其他文件类型。
使用这个命令:
find /home/ppp -type f -exec chmod 444 {} \;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.