chmod:如何以递归方式将执行权限仅添加到已经具有执行权限的文件中 [英] chmod: How to recursively add execute permissions only to files which already have execute permission
本文介绍了chmod:如何以递归方式将执行权限仅添加到已经具有执行权限的文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到:
chmod -R a+x
将执行权限添加到所有文件,而不仅仅是当前可执行文件.
chmod -R a+x
adds execute permissions to all files, not just those who are currently executable.
是否可以仅向已经具有用户权限执行集的文件添加执行权限?
Is there a way to add execute permissions only to those files who already have an execute set for the user permission?
推荐答案
使用find
:
find . -perm /u+x -execdir chmod a+x {} \;
这篇关于chmod:如何以递归方式将执行权限仅添加到已经具有执行权限的文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文