Linux

What is a file descriptor? What file descriptors are you familiar with?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Kerberos File descriptor, also known as file handler, is a unique number which identifies an open file in the operating system.

In Linux (and Unix) the first three file descriptors are:

  • 0 - the default data stream for input
  • 1 - the default data stream for output
  • 2 - the default data stream for output related to errors

This is a great article on the topic: https://www.computerhope.com/jargon/f/file-descriptor.htm