summaryrefslogtreecommitdiff
path: root/static/v10/man2/lseek.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 21:07:28 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 21:07:28 -0400
commit711594636704defae873be1a355a292505585afd (patch)
tree59ee13f863830d8beba6cfd02bbe813dd486c26f /static/v10/man2/lseek.2
parent3258a063c1f189d7b019e40e525b46bef9b9a7b1 (diff)
docs: Added UNIX V10 Manuals
Diffstat (limited to 'static/v10/man2/lseek.2')
-rw-r--r--static/v10/man2/lseek.247
1 files changed, 47 insertions, 0 deletions
diff --git a/static/v10/man2/lseek.2 b/static/v10/man2/lseek.2
new file mode 100644
index 00000000..ff982262
--- /dev/null
+++ b/static/v10/man2/lseek.2
@@ -0,0 +1,47 @@
+.TH LSEEK 2
+.CT 2 file_io
+.SH NAME
+lseek \(mi seek, move read/write pointer
+.SH SYNOPSIS
+.nf
+.B long lseek(fildes, offset, whence)
+.B long offset;
+.fi
+.SH DESCRIPTION
+.I Lseek
+sets the file pointer for the file
+associated with
+.I fildes
+as follows:
+.IP
+If
+.I whence
+is 0, the pointer is set to
+.I offset
+bytes.
+.IP
+If
+.I whence
+is 1, the pointer is set to its current location plus
+.IR offset .
+.IP
+If
+.I whence
+is 2, the pointer is set to the size of the
+file plus
+.IR offset .
+.PP
+The new file pointer value is returned.
+.PP
+Seeking far beyond the end of a file, then writing,
+creates a gap or `hole,' which occupies no
+physical space and reads as zeros.
+.SH "SEE ALSO"
+.IR open (2),
+.IR fseek (3)
+.SH DIAGNOSTICS
+.BR EBADF ,
+.BR ESPIPE
+.SH BUGS
+.I Lseek
+doesn't affect some special files.