---
name: "_llseek"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/_llseek"
---

# \_llseek(2)

reposition read/write file offset

## NAME

\_llseek - reposition read/write file offset

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/syscall.h>      /* Definition of SYS_* constants */
#include <unistd.h>
```

**int syscall(SYS\_\_llseek, unsigned int** *fd***, unsigned long** *offset\_high***,**             **unsigned long** *offset\_low***, loff\_t \****result***,**             **unsigned int** *whence***);**

## DESCRIPTION

The **\_llseek**() system call repositions the offset of the open file description associated with the file descriptor *fd* to the value

-

  (offset\_high \<\< 32) \| offset\_low

This new offset is a byte offset relative to the beginning of the file, the current file offset, or the end of the file, depending on whether *whence* is **SEEK\_SET**, **SEEK\_CUR**, or **SEEK\_END**, respectively.

The new file offset is returned in the argument *result*. The type *loff\_t* is a 64-bit signed type.

This system call exists on various 32-bit platforms to support seeking to large file offsets.

## RETURN VALUE

Upon successful completion, **\_llseek**() returns 0. Otherwise, a value of -1 is returned and *errno* is set to indicate the error.

## ERRORS

- **EBADF**

  *fd* is not an open file descriptor.

- **EFAULT**

  Problem with copying results to user space.

- **EINVAL**

  *whence* is invalid.

## VERSIONS

You probably want to use the [**lseek**(2)](/lseek/2.md) wrapper function instead.

## STANDARDS

Linux.

## SEE ALSO

[**llseek**(3)](/llseek/3.md), [**lseek**(2)](/lseek/2.md), [**open**(2)](/open/2.md)
