Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Stephen Kitt's answerStephen Kitt's answer is close, but not quite correct; if we read lseek(2) more carefully, we will see that it actually says (bold mine):

The lseek() function repositions the file offset of the open file description associated with the file descriptor fd [...]

So, what's an "open file description" and how does it relate to a "file descriptor"?

Well, down in the NOTES section, we find:

See open(2) for a discussion of the relationship between file descriptors, open file descriptions, and files.

Perfect! However, rather than pasting a wall of text from the manpage, I'll just link to a good answer to "What is an open file description?"a good answer to "What is an open file description?" that explains the same thing.

Stephen Kitt's answer is close, but not quite correct; if we read lseek(2) more carefully, we will see that it actually says (bold mine):

The lseek() function repositions the file offset of the open file description associated with the file descriptor fd [...]

So, what's an "open file description" and how does it relate to a "file descriptor"?

Well, down in the NOTES section, we find:

See open(2) for a discussion of the relationship between file descriptors, open file descriptions, and files.

Perfect! However, rather than pasting a wall of text from the manpage, I'll just link to a good answer to "What is an open file description?" that explains the same thing.

Stephen Kitt's answer is close, but not quite correct; if we read lseek(2) more carefully, we will see that it actually says (bold mine):

The lseek() function repositions the file offset of the open file description associated with the file descriptor fd [...]

So, what's an "open file description" and how does it relate to a "file descriptor"?

Well, down in the NOTES section, we find:

See open(2) for a discussion of the relationship between file descriptors, open file descriptions, and files.

Perfect! However, rather than pasting a wall of text from the manpage, I'll just link to a good answer to "What is an open file description?" that explains the same thing.

Source Link
SamB
  • 439
  • 3
  • 13

Stephen Kitt's answer is close, but not quite correct; if we read lseek(2) more carefully, we will see that it actually says (bold mine):

The lseek() function repositions the file offset of the open file description associated with the file descriptor fd [...]

So, what's an "open file description" and how does it relate to a "file descriptor"?

Well, down in the NOTES section, we find:

See open(2) for a discussion of the relationship between file descriptors, open file descriptions, and files.

Perfect! However, rather than pasting a wall of text from the manpage, I'll just link to a good answer to "What is an open file description?" that explains the same thing.