开发者

recursively removing permissions under root folder

i am new to linux platform and now i wanted to remove write permissions of all the php files unde开发者_如何学Gor my root folder. It would be appreciable if somebody can suggest a solution.

thanks and regards

tismon


find / -name '*.php' -exec chmod a-w {} \;


An alternate option would be to use these 2 commands

cd /
chmod -R a-w *.php

But I also recommend (like Matthieu did) to have a look first, what files you are really modifying.


This will work:

find /root -type f -name "*php" | xargs chmod 664
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜