[plug] find -exec

Lyndon Maydwell maydwell at gmail.com
Tue Oct 25 00:00:43 WST 2005


> > find dir/ -type d | xargs chmod 755
> > find dir/ -not -type d | xargs chmod 644

didn't like funny filenames, solution:

find dir/ -not -type d -and -not -perm 0644 -print0 | xargs -0 chmod 644
find dir/ -type d -and -not -perm 0755 -print0 | xargs -0 chmod 755

Thanks for the help cameron. #plug for the win.



More information about the plug mailing list