Citi interview question

Unix commands, Situation solution