1 2 3 4 5 6 7 8
#!/usr/bin/env bash IFS=':' read -r -a paths <<<"${PATH}" for directory in "${paths[@]}"; do [ -d "${directory}" ] && find "${directory}" -type f -perm /u+s,g+s -ls done
Consider giving Nix/NixOS a try! <3