I’d like to have a function like this that only has to search the folder once instead of three times to do it’s job.
# Fixes permissions for files and directories in the given folder or the current folder
function fixpermissions() {
find "${1:-.}" -type f -executable -exec chmod 744 {} \;
find "${1:-.}" -type f ! -executable -exec chmod 644 {} \;
find "${1:-.}" -type d -exec chmod 755 {} \;
}