Welcome back! Let’s start the week with a real-world Linux skill that separates casual users from confident admins.
Today’s focus is the find command. Powerful, precise, and absolutely essential when the system gets messy.
Go beyond file names. Track files by ownership, size, permissions, and time. This is how real admins hunt problems in production systems.
Use man find before guessing. Search inside it for TESTS and ACTIONS to unlock the real power.
Scenario: A user named alex created chaos on the server. Your task is to investigate and clean up using precise find commands.
/var/tmp that are owned by user alex./home that have the SetUID bit set./var/log modified in the last 60 minutes./var/tmp and delete them immediately using -exec.Your mission: post the exact commands you would run.
Go hunt. Let’s see who really knows their find.
All 5 questions are blockbusters !! If you can answer all 5 - you are the real linux world Ethan Hunt!
I think I'm more likely to be Luther Stickell or Benji Dunn!
Assuming we're not logged in as root, so we'll prefix all commands with sudo.
Specify type -f on all commands to exclude directories; files only!
1) sudo find /var/tmp -type f -user alex
2) sudo find / -type f -size +50M 2>/dev/null
3) sudo find /home -type f -perm -4000
4) sudo find /var/log -type f -mmin -60
Bonus: sudo find /var/tmp -type f -user alex -exec rm -f {} +
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.