# FADVISE - utility to use the posix_fadvise system call - man(1) - [phpMan]

> **TLDR:** Control Linux file caching behavior.
>
- Preload a file or directory into cache:
  `fadvise {{-a|--advice}} willneeded {{path/to/file_or_directory}}`
- Suggest dropping a file from cache:
  `fadvise {{path/to/file}}`
- Display help:
  `fadvise {{-h|--help}}`

*Source: tldr-pages*

---

[_FADVISE_(1)](https://www.chedong.com/phpMan.php/man/FADVISE/1/markdown)                                  User Commands                                 [_FADVISE_(1)](https://www.chedong.com/phpMan.php/man/FADVISE/1/markdown)

## NAME
       fadvise - utility to use the posix_fadvise system call

## SYNOPSIS
       **fadvise **[**-a _**advice_] [**-o _**offset_] [**-l _**length_] _filename_

       **fadvise **[**-a _**advice_] [**-o _**offset_] [**-l _**length_] -d _file-descriptor_

## DESCRIPTION
       **fadvise **is a simple command wrapping posix_fadvise system call that is for predeclaring an
       access pattern for file data.

## OPTIONS
### -d --fd _
           Apply the advice to the file specified with the file descriptor instead of open a file
           specified with a file name.

### -a --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 _
           Specifies the beginning offset of the range, in bytes. If this option is omitted, 0 is
           used as default advice.

### -l --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
           Print version and exit.

## EXIT STATUS
       **fadvise **has the following exit status values:

       **0**
           success

       **1**
           unspecified failure

## AUTHORS
       Masatake YAMATO <<yamato@redhat.com>>

## SEE ALSO
       [**posix_fadvise**(2)](https://www.chedong.com/phpMan.php/man/posixfadvise/2/markdown)

## REPORTING BUGS
       For bug reports, use the issue tracker at <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/>>.

util-linux 2.39.3                            2023-11-21                                   [_FADVISE_(1)](https://www.chedong.com/phpMan.php/man/FADVISE/1/markdown)
