They don't actually have to think of 10, but their answer can show what they've actually had to do on a *nix system. Its also lets you prod them with questions like 'how might I get disk usage' or if they mention dd, ask them how they use it, what its good for etc.
"How would you recursively delete all files with extension 'mp3' in a given directory tree?"
The (simplest) correct answer (I know) is
find /path/to/wherever -name "*.mp3" -exec rm -fv {} \;
Maybe that's more of a pons asinorum, I suppose, but then isn't a pons asinorum precisely what a fizzbuzz question is meant to be? find /path/to/wherever -name "*.mp3" -delete find /path/to/wherever -name "*.mp3" -delete
This works at least in GNU find and FreeBSD. cd /path/to/wherever
rm -rf *.mp3
? find path -iname "*.mp3" -print0 | xargs -0 rm -fv xargs reads items
from the standard input, delimited by blanks (which can be protected
with double or single quotes or a backslash) or newlines, and executes
the command (default is /bin/echo) one or more times with any initial-
arguments followed by items read from standard input.
--max-chars=max-chars
-s max-chars
Use at most max-chars characters per command line, including the
command and initial-arguments and the terminating nulls at the
ends of the argument strings. The largest allowed value is sys‐
tem-dependent, and is calculated as the argument length limit
for exec, less the size of your environment, less 2048 bytes of
headroom. If this value is more than 128KiB, 128Kib is used as
the default value; otherwise, the default value is the maximum.
1KiB is 1024 bytes.If a candidate's answer to a nonspecific troubleshooting scenario didn't begin with (or contain very close to the beginning of the answer) "look at the logs" I'd bump them. Anybody whose problem-solving methodology doesn't including gathering pertinent data early in the process isn't somebody I want "solving" problems for me.
You'd be surprised of how many supposed Linux admins have no idea how to setup ssh logins, which says a lot about the depth of their experience.
2 - How would you check if $DATABASE is running and how would you start it if it wasn't. Bonus points: how do you make it start automatically at next reboot
3 - Show me the processes using the most CPU
Grep a current running process.
Grep x file and copy it.
You'd be surprised how many "Sys Admins" I've interviewed who can't do basic things.
Q: "Something you have no experience with has broken and won't do a basic function, how will you go about fixing it?" A: Research, ask someone else etc.
Q: "X is missing their password for a system we have no admin rights on. How are you going to fix this?" A: Recovery Tools. Format device and set it up again. Use JS/Developer tools to get it in plain text from the browser.