What is a file descriptor, and what are 0, 1 and 2?

IntermediateConceptLinux and shell
Answer

An integer handle to an open file, socket or pipe. 0 is stdin, 1 is stdout, 2 is stderr. Per-process limits are shown by ulimit -n, and "Too many open files" means that limit was hit.

All Real-World Interview questions Roadmap: Interview readiness

More on Linux and shell