[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interview questions [was: Re: a question regarding resumes]



Fyodor Yarochkin writes:
> > "Does NFS use TCP or UDP?" and "What does the -v option to grep do?" to
> > name two favorite questions of acquaintances. 
> > 
> hmm.. wondering if knowlege of such things as "-v option of grep" or
>  "-bd option of sendmail" count here? You always have man to have a look, 
> we have such questions on exams in my Uni, but i would be surprised if 
> Interviewer would ask such ...

I'm not so sure.  My all-time favorite is to ask folks what the output of 

ps -ef |grep foo |grep -v grep |awk '{print $1}' |xargs kill -9

does on a SysV machine.

The correct answer is nothing.  :-)

Only three people out of hundreds I've interviewed have ever caught that 
it's $2, not $1 that's meaningful, but that's just a trick.  This question 
then leads me to:

why would such a command line be useful?
are there other ways to do this?
why the grep -v grep (since it comes after the ps on the command line, why
should I need it?   lots of folks don't understand how the shell parses the
command line)
what does the -v option to grep do
what does xargs do?  
if I use xargs in a "find (bunch of options) | xargs rm", why is this bad? 


I agree that just asking "what does grep -v do?", isn't very useful, but
using something like it as a branch from which to explore lots of options
can prove most enlightening.

-> Paul <-