Recursively removing the execute permission

Nils Kassube kassube at gmx.net
Thu Apr 29 15:38:28 UTC 2010


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




More information about the kubuntu-users mailing list