lseek64(3)

πŸ’– lseek64(3) β€” the Library Functions Manual glow-up πŸ’–

okay bestie, so this one's from the Library Functions Manual, it lives in section 3, and it is very much deprecated. like, the manpage itself is telling you to go elsewhere. we love a humble icon.


✨ NAME ✨

lseek64 β€” reposition a 64-bit read/write file offset 🎯

πŸ“š LIBRARY πŸ“š

Standard C library (libc, link with -lc)

🫢 SYNOPSIS 🫢

#define _LARGEFILE64_SOURCE     /* See feature_test_macros(7) */
#include <sys/types.h>
#include <unistd.h>

[[deprecated]] off64_t lseek64(int fd, off64_t offset, int whence);

heads up: see that [[deprecated]] sitting right there in the signature? yeah. that's the compiler literally side-eyeing you. 😭

🌸 DESCRIPTION 🌸

Bestie, real talk: this function is equivalent to lseek(2) as long as you compile with

#define _FILE_OFFSET_BITS 64

That's it. That's the whole tea.

And because that's the whole tea, the actual instruction is:

Use lseek(2) instead. 🫡

Not a suggestion. That's the manpage. It said what it said. πŸ’…

🧚 ATTRIBUTES 🧚

If you wanna know what these terms even mean, go peek at attributes(7). For everyone else, here's the vibe check on lseek64():

  • Interface: lseek64()
  • Attribute: Thread safety
  • Value: MT-Safe βœ…

(it's safe across threads, so at least there's that 🫢)

πŸ‘‘ HISTORY πŸ‘‘

  • glibc 2.1 β€” that's when it arrived, periodt. πŸ‘‘
  • lseek64() is one of the functions that was specified in the Large File Summit (LFS) specification, which was completed in 1996. The whole point of that spec was to give folks transitional support, so that applications running on 32-bit systems could actually access files whose size exceeds what a 32-bit off_t type could ever represent. iconic 90s problem-solving fr fr πŸ¦‹

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie!! πŸŽ€ this was Linux man-pages 6.20, dated 2026-06-13 πŸ’œ now go use lseek(2) like the manpage asked, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms