Recursively removing the execute permission

Nigel Ridley nigel at prayingforisrael.net
Thu Apr 29 16:14:51 UTC 2010


On 04/29/2010 06:38 PM, Nils Kassube wrote:
> Nigel Ridley wrote:
>> On 04/29/2010 05:32 PM, Nils Kassube wrote:
>>> 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 {} \;
>
>> Just to clarify: Do I have tp specify a directory, or can I just cd
>> there?
>
> Either way - as default, find operates from the current directory.
> However if you want to specify a directory the last command would be
> like this:
>
> find /path/to/directory -type f -exec chmod -x {} \;
>
> And of course it could be a relative path as well.
>
>
> Nils
>
Thanks - it worked a treat :-)




More information about the kubuntu-users mailing list