File Descriptor
file descriptor (fd)
An integer value that distinguishes open files.
- Managed by the kernel for each process.
- Default file descriptors
- 0: stdin (standard input)
- 1: stdout (standard output)
- 2: stderr (standard error)
file table
A table that manages various information about open files.
- access mode: Indicates the mode in which the file was opened.
- file offset: An offset indicating the current read or write position in the file.
- pointer: A pointer to the actual
inode.
inode
A structure containing metadata about a file.
- Manages pointers to actual data blocks.
- Accessed and managed via the
inodenumber.- Mapped with the file name.