Interview Q&A / Linux & Shell
Linux & Shell interview questions
Permissions, processes, pipes and the commands you are expected to know cold.
Prefer rapid revision? Practise Linux & Shell short interview answers →
- How do you watch a log file grow in real time?
Use tail -f file to print the last lines and keep following new lines as they are written. tail -F also survives log rotation by reopening the file when it is replaced, and Ctrl+C stops it.
BeginnerQuick answer1 min read - What is stored in /var, and why does it keep growing?
/var holds variable data that changes while the system runs: logs, mail spools, package caches, databases and print queues. It grows because logs and caches accumulate, which is why a full /var is a common cause of a server misbehaving.
BeginnerQuick answer1 min read