---
name: "ioctl_fs"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ioctl_fs"
---

# ioctl\_fs(2)

filesystem operations

## NAME

ioctl\_fs - filesystem operations

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/fs.h>  /* Definition of op constants */
#include <sys/ioctl.h>
```

**int ioctl(int** *fd***, unsigned long** *op***, ...);**

## DESCRIPTION

The following *op* values are available.

### Share some of the data of one file with another file

- [**FICLONE**(2const)](/FICLONE/2const.md) [**FICLONERANGE**(2const)](/FICLONERANGE/2const.md)

  - [**FIDEDUPERANGE**(2const)](/FIDEDUPERANGE/2const.md)

  ### Operations for inode flags

- [**FS\_IOC\_GETFLAGS**(2const)](/FS_IOC_GETFLAGS/2const.md) [**FS\_IOC\_SETFLAGS**(2const)](/FS_IOC_SETFLAGS/2const.md)

  ### Get or set a filesystem label

- [**FS\_IOC\_GETFSLABEL**(2const)](/FS_IOC_GETFSLABEL/2const.md) [**FS\_IOC\_SETFSLABEL**(2const)](/FS_IOC_SETFSLABEL/2const.md)

  ### Get and/or clear page flags

- [**PAGEMAP\_SCAN**(2const)](/PAGEMAP_SCAN/2const.md)

  ## RETURN VALUE

On success, a nonnegative value is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## STANDARDS

Linux.

## SEE ALSO

[**ioctl**(2)](/ioctl/2.md)
