?? lseek.2
字號:
.TH LSEEK 2 .SH NAMElseek, tell \- move read/write pointer.SH SYNOPSIS.B long lseek(fildes, offset, whence).br.B long offset;.PP.B long tell(fildes).SH DESCRIPTIONThe filedescriptor refers to a file open for reading or writing.The read (resp. write) pointer for the file is set as follows:.IPIf.I whenceis 0, the pointer is set to.I offsetbytes..IPIf.I whenceis 1, the pointer is set to its current location plus.IR offset ..IPIf.I whenceis 2, the pointer is set to the size of thefile plus.IR offset ..PPThe returned value is the resulting pointer location..PPThe obsolete function.IR tell ( fildes )is identical to.IR lseek ( "fildes, 0L, 1" )..PPSeeking far beyond the end of a file, then writing,creates a gap or `hole', which occupies nophysical space and reads as zeros..SH "SEE ALSO"open(2), creat(2), fseek(3).SH DIAGNOSTICS\-1is returned foran undefined file descriptor,seek on a pipe,or seek to a position before the beginning of file..SH BUGS.I Lseekis a no-op on character special files..SH ASSEMBLER(lseek = 19.).br(file descriptor in r0).br.B sys lseek; offset1; offset2; whence.PP.I Offset1and.I offset2are the high and low words of .IR offset ;r0 and r1 containthe pointer upon return.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -