Open File vs Open file descriptiors


What is the difference between open file descriptors and open files? I'm  using  linux centOS.

Who is Participating?
woolmilkporcConnect With a Mentor Commented:
An "open file" is represented by an entry in a kernel table (one per process), and a file descriptor is an index to this table.

The application doesn't access a file directly but passes this descriptor to the kernel which uses it as a key to access the file "on behalf" of the application.

So an "open file descriptor" is an index to a table of "open files".

upanwarConnect With a Mentor Commented:
This could also explain you.
roemelboemelConnect With a Mentor Commented:
short - and not 100% accurate - answer:

"everything is a file"
an open file descriptor is a "thing" which represents an open file
long answer:
mokkanAuthor Commented:
should be fixed.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.