If you throw an strace on a process that interacts with the filesystem you’ll see that stuff like open() returns a file descriptor and stuff like read() takes a file descriptor as an argument.
These are also generally the numbers you’re using when you do I/O redirection in your shell with stuff like 2>&1 or exec 5< ./some_file.txt
FWIW: https://en.wikipedia.org/wiki/File_descriptor#file_descriptor_table
If you throw an
straceon a process that interacts with the filesystem you’ll see that stuff likeopen()returns a file descriptor and stuff likeread()takes a file descriptor as an argument.These are also generally the numbers you’re using when you do I/O redirection in your shell with stuff like
2>&1orexec 5< ./some_file.txt