llseek(3)
π llseek(3) β bestie edition β¨
okay so this is the llseek page from the Linux man-pages, and I'm gonna be so real with you: this one is a short read, because there's not much to say. it's a whole page in the standard C library manual. let's go π«Ά
πΈ NAME πΈ
llseek β reposition read/write file offset
like. it says it moves your read/write file offset. that's the job description. π
π LIBRARY π
Standard C library (libc, -lc)
so you'd link it with -lc, which, bestie, you already do, that's literally the default. not the point though. keep reading. π¦
β¨ SYNOPSIS β¨
[[deprecated]] loff_t llseek(int fd, loff_t offset, int whence);
see that [[deprecated]] right there? π that's not decoration. that's a whole warning label. and the compiler means it.
π DESCRIPTION π
okay so, no cap, this is not the function you are interested in.
i'm not being shady, that's literally the doc. "This is not the function you are interested in."
go look at _llseek(2) or lseek(2) instead. those are the ones. those are your girls. π
fr fr, if you got here looking for how to move a file offset, you're in the wrong room. the vibe check failed. turn around. πͺ
π HISTORY π
narrator voice so, back in the dayβ¦ β¨
people were complaining about data loss β which, π β caused by a miscompilation</> of e2fsck(8). like, e2fsck is the filesystem checker. e2fsck doing unscheduled data loss is not the vibe. genuinely cursed behavior.
so glibc 2.1.3 said "we can't let this slide" and added a link-time warning that goes exactly like this:
"the `llseekΒ΄ function may be dangerous; use `lseek64Β΄ instead."
(the backtick-quote situation in there is verbatim, that's exactly how it looked, i'm not gonna clean it up, respect the artifact π«‘)
and then the glow-down continued: since glibc 2.28, this function symbol is no longer available to newly linked applications. gone. not available. she's not coming to the function table. bye bestie ππ
β οΈ so if you're linking something new and you think you needllseek, you don't. you can't. go to_llseek(2)orlseek(2). periodt.
π¦ SEE ALSO π¦
_llseek(2)β the syscall energy, if that's your thing π₯lseek(2)β the one you probably actually want, bestie πlseek64(3)β the one that link-time warning specifically told you to use π
and that's the whole page!! she's short but she's iconic π
this was brought to you by Linux man-pages 6.20, dated 2026-06-13, filed under llseek(3) β mwah, take care of yourselves, go use lseek(2), drink some water ππ§β¨
π¦ 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
- Copyright 2004, Andries E. Brouwer <aeb@cwi.nl>
- Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms