Interview Prep/Shell Scripting/find, xargs, jq and yq

What are the most useful `find` predicates for operations work?

BeginnerConceptfind, xargs, jq and yq
Answer
find /var/log/app -type f -name '*.log' -mtime +14       # older than 14 days
find / -xdev -type f -size +500M 2>/dev/null              # big files, stay on this filesystem
find /srv -type f -perm -o+w                              # world-writable files
find /home -nouser -o -nogroup                            # orphaned files
find . -maxdepth 1 -type d -name 'release-*'              # do not recurse
find /etc -newer /var/run/last-deploy -type f             # changed since a marker
find /tmp -type f -mmin +60 -user www-data                # older than 60 minutes

Quote patterns ('*.log') so the shell does not expand them before find sees them.

All Shell Scripting questions Roadmap: Shell scripting (Bash)

More on find, xargs, jq and yq