---
name: "off_t"
section: "3type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/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)](/copy_file_range/2.md), [**lseek**(2)](/lseek/2.md), [**mmap**(2)](/mmap/2.md), [**posix\_fadvise**(2)](/posix_fadvise/2.md), [**pread**(2)](/pread/2.md), [**readahead**(2)](/readahead/2.md), [**sync\_file\_range**(2)](/sync_file_range/2.md), [**truncate**(2)](/truncate/2.md), [**fseeko**(3)](/fseeko/3.md), [**lockf**(3)](/lockf/3.md), [**posix\_fallocate**(3)](/posix_fallocate/3.md), [**feature\_test\_macros**(7)](/feature_test_macros/7.md)
