fadvise(1)

fadvise1

Utility to use the *posix_fadvise*(2) system call

Usage

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

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

Overview

fadvise is a simple command wrapping posix_fadvise(2) system call that is for predeclaring an access pattern for file data.

Options

-d, --fd file-descriptor

Apply the advice to the file specified with the file descriptor instead of open a file specified with a file name.

-a, --advice advice

See the command output with --help option for available values for advice. If this option is omitted, "dontneed" is used as default advice.

-o, --offset offset

Specifies the beginning offset of the range, in bytes. If this option is omitted, 0 is used as default advice.

-l, --length length

Specifies the length of the range, in bytes. If this option is omitted, 0 is used as default advice.

-h, --help

Display help text and exit.

-V, --version

Display version and exit.

Exit status

fadvise has the following exit status values:

0

success

1

unspecified failure

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

Authors

Masatake YAMATO <[email protected]>

Reporting bugs

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

Availability

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

From util-linux 2.42.4-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.