dimanche 28 décembre 2014

seek command in unix


I try to understand the seek command from unix version 6. Here is the man page: http://man.cat-v.org/unix-6th/2/seek


This example: seek(0,0,2)


So the first argument is the filedescriptor. And 0 would we the standardinput. The second argument is the offset, which is 0. And the third argument tells us according to man page "the pointer is set to the size of the file plus offset."


But why would you do this? Why would you point after the file?


The line is from this source code: http://www.v6shell.org/history/goto.c



Aucun commentaire:

Enregistrer un commentaire