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.

Level: advancedTopic: Computing foundations

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.