Thursday, April 12, 2007

CHMOD a-x on executable files in subdirs

Today I copied a lot of files from a Samba share, the problem with this is that
chmod a-x * -R
won't work since all directories will also be non-executable and therefor not accessible.
The command I used is:
find -type f -exec chmod a-x {} \;


Thanks to Pascal de Bruijn, Stephan Kochen and Martijn van de Streek.

No comments: