Recursively removing the execute permission
Nils Kassube
kassube at gmx.net
Thu Apr 29 14:32:38 UTC 2010
Nigel Ridley wrote:
> I need to recursively remove the execute permission on a bunch of
> [html] files that came from a Windows box. The problem I have is
> that there are child directories within the main directory.
>
> How can I get this done?
> I did some Googling and came up with:
> % chmod -x ...
> but I don't understand it enough to use it :-(
It doesn't work with chmod alone, you need find to select the files to
modify. If you want to use it for html files only, this should work:
find -name \*.html -exec chmod -x {} \;
And if you want to use it for all ordinary files, try this:
find -type f -exec chmod -x {} \;
Nils
More information about the kubuntu-users
mailing list