AI engineering glossary · Computing foundations
What is file descriptor?
File descriptor: A small integer that a Unix-like operating system gives a process to refer to an open file, socket or pipe. Programs read and write using this handle, and numbers 0, 1 and 2 are standard input, output and error.
File descriptor: an example
When a script opens a log file, the kernel returns a descriptor such as 3 that later reads and writes use.
Related terms
More Computing foundations terms
- File extension
- File system
- Firewall
- Firmware
- Floating-point number
- Garbage collection
- Global interpreter lock
- Graphical user interface
Where you learn it
File descriptor is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.