> > 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.