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

# off\_t(3type)

file sizes

## NAME

off\_t, off64\_t, loff\_t - file sizes

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
#include <sys/types.h>
```

**typedef** /\* ... \*/  **off\_t;**

**#define \_LARGEFILE64\_SOURCE** **#include \<sys/types.h\>**

**typedef** /\* ... \*/  **off64\_t** \[\[deprecated\]\]**;**

**#define \_GNU\_SOURCE** **#include \<sys/types.h\>**

**typedef** /\* ... \*/  **loff\_t;**

## DESCRIPTION

*off\_t* is used for describing file sizes. It is a signed integer type.

*off64\_t* is a 64-bit version of the type, used in glibc.

*loff\_t* is a 64-bit version of the type, introduced by the Linux kernel.

## STANDARDS

- *off\_t*

  POSIX.1-2024.

- *off64\_t*

  None.

- *loff\_t*

  Linux.

## HISTORY

- *off\_t*

  POSIX.1-1988.

- *off64\_t*

  Large File Summit (LFS).

*\<aio.h\>* and *\<stdio.h\>* define *off\_t* since POSIX.1-2008.

## NOTES

On some architectures, the width of *off\_t* can be controlled with the feature test macro **\_FILE\_OFFSET\_BITS**.

The following headers also provide *off\_t*: *\<aio.h\>*, *\<fcntl.h\>*, *\<stdio.h\>*, *\<sys/mman.h\>*, *\<sys/stat.h\>*, and *\<unistd.h\>*.

## SEE ALSO

[**copy\_file\_range**(2)](/man/copy_file_range/2.md), [**lseek**(2)](/man/lseek/2.md), [**mmap**(2)](/man/mmap/2.md), [**posix\_fadvise**(2)](/man/posix_fadvise/2.md), [**pread**(2)](/man/pread/2.md), [**readahead**(2)](/man/readahead/2.md), [**sync\_file\_range**(2)](/man/sync_file_range/2.md), [**truncate**(2)](/man/truncate/2.md), [**fseeko**(3)](/man/fseeko/3.md), [**lockf**(3)](/man/lockf/3.md), [**posix\_fallocate**(3)](/man/posix_fallocate/3.md), [**feature\_test\_macros**(7)](/man/feature_test_macros/7.md)
