Google Interview Question

How would you restore /etc/passwd on a machine with a corrupt root disk which is only barely functioning. You have a shell and most unix shell commands, but no text editors.

Interview Answers

Anonymous

Oct 18, 2010

Use perl/sed/awk/ed/ex. This question is basically trying to test if you're truly familiar with the unix toolset and can use it creatively.

Anonymous

Nov 16, 2010

echo "passwd file stuff" > /etc/passwd