What Is an Open File in Linux?
Contents What Is an Open File? an Open File May Be a Regular File, a Directory, a Block Special File, a Character Special File, an Executing Text Reference, a...
What is an open file? An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file.
What happens when you open a file in Linux?
In simple terms, when you open a file you are actually requesting the operating system to load the desired file ( copy the contents of file ) from the secondary storage to ram for processing.
Must Read
How do I close open files in Linux?
If you want to find only close the open file descriptors, you can use the proc filesystem on systems where it exists. E.g. on Linux, /proc/self/fd will list all open file descriptors. Iterate over that directory, and close everything >2, excluding the file descriptor that denotes the directory you are iterating over.