How Do I Use File Descriptors in Linux?
Contents What Are File Descriptors in Linux? in Unix and Related Computer Operating Systems, a File Descriptor (Fd, Less Frequently Fildes) Is an Abstract...
Contents
What are file descriptors in Linux?
In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
How does file descriptor work?
A file descriptor is a non – negative integer. When we open an existing or create a new file, the kernel returns a file descriptor to a process. When we want to read or write on a file, we identify the file with file descriptor that was retuned by open or create, as an argument to either read or write.