Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

Unix

Unix v6

seek(2)



seek move read/write pointer (seek = 19.)
(file descriptor in r0)
sys seek; offset; ptrname seek(fildes, offset, ptrname)
The file descriptor refers to a file open for reading or writing. The read (resp. write) pointer for the file is set as follows: if is 0, the pointer is set to if is 1, the pointer is set to its current location plus if is 2, the pointer is set to the size of the file plus if is 3, 4 or 5, the meaning is as above for 0, 1 and 2 except that the offset is multiplied by 512. If is 0 or 3, is unsigned, otherwise it is signed. open (II), creat (II) The error bit (c-bit) is set for an undefined file descriptor. From C, a 1 return indicates an error.



seek(2)