FADVISE(1)

โœจ fadvise โ€” the girlies' guide โœจ

okay so bestie, welcome to fadvise(1) ๐Ÿ’– this is a User Commands manual page, and it's about a lil utility that uses the posix_fadvise(2) system call. yes it's a real thing. yes it's giving kernel-adjacent main character energy. let's get into it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

fadvise โ€” a utility to use the posix_fadvise(2) system call โœจ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

fadvise [-a advice] [-o offset] [-l length] filename

fadvise [-a advice] [-o offset] [-l length] -d file-descriptor

two whole ways to run her. pick your fighter ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so fadvise is a simple command that wraps the posix_fadvise(2) system call, and what that call does is predeclare an access pattern for file data. that's it. that's the whole vibe. you're basically telling the kernel "hey girl, here's how i'm gonna be reading this file, just so you know" ๐Ÿ”ฅ


๐Ÿ’œ OPTIONS ๐Ÿ’œ

  • -d, --fd file-descriptor โ€” apply the advice to the file specified with the file descriptor instead of opening a file specified with a file name. fd girlies, this one's for you ๐Ÿซถ
  • -a, --advice advice โ€” the actual advice you're handing over. peep the command output with the --help option to see the available values for advice, bestie, because that's where they live. if you omit this option, dontneed is used as the default advice. no cap ๐Ÿ’…
  • -o, --offset offset โ€” specifies the beginning offset of the range, in bytes. if you omit this option, 0 is used as default advice. (yes, it says "default advice" in the original and we are respectfully passing that along verbatim ๐Ÿ˜ญ)
  • -l, --length length โ€” specifies the length of the range, in bytes. if you omit this option, 0 is used as default advice. same energy, same wording, iconic ๐Ÿ™ˆ
  • -h, --help โ€” display help text and exit. the classic.
  • -V, --version โ€” display version and exit. also the classic.

โญ EXIT STATUS โญ

fadvise has the following exit status values:

  • 0 โ€” success ๐ŸŽ‰ ate, no crumbs
  • 1 โ€” unspecified failure ๐Ÿ’€ not the vibe

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Masatake YAMATO <yamato@redhat.com>


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

posix_fadvise(2)


๐Ÿ“ REPORTING BUGS ๐Ÿ“

for bug reports, use the issue tracker: <https://github.com/util-linux/util-linux/issues>.

bestie if something's broken, tell the tracker, not me ๐Ÿ˜ญ i am simply the messenger ๐Ÿงš

๐ŸŒธ AVAILABILITY ๐ŸŒธ

the fadvise command is part of the util-linux package, which can be downloaded from the Linux Kernel Archive: <https://www.kernel.org/pub/linux/utils/util-linux/>.


and that's the whole page, you're so welcome ๐Ÿ’– this lil writeup came to you courtesy of util-linux 2.42.4, dated 2026-09-21 โ€” periodt, go fadvise something ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms