---
name: "btrfsctl"
section: "8"
platform: "linux"
package: "btrfs-tools"
version: "0.19+20120328-7.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/btrfsctl"
---

# btrfsctl(8)

control a btrfs filesystem

## NAME

btrfsctl - control a btrfs filesystem

## SYNOPSIS

**btrfsctl** \[ **-d** *file\|directory*  \] \[ **-s** *snapshot-name directory* \] \[  **-S** *subvolume-name directory* \] \[  **-r** *\[+-\]size* \] \[  **-A** *device* \] \[  **-a** \] \[  **-c** \]

## NOTE

B btrfsctl is deprecated. Please consider to switch to the btrfs utility.

## DESCRIPTION

**btrfsctl** is used to control the filesystem and the files and directories stored. It is the tool to create a new snapshot for the filesystem.

## OPTIONS

- **-d** *file\|directory*

  Defragment a file or a directory. If the argument is a directory, the entire b-tree under the directory is defragged.

- **-s** *snapshot-name directory*

  Creates a new *snapshot* of the *directory* specified.

- **-S** *subvolume-name directory*

  Creates a new subvolume.

- **-r** *\[+\|-\]size*

  Resizes the filesystem with the *size* specified. If the value is preceded with a signed symbol, the filesystem is resized with respect to the current filesystem size. *size* can be suffixed by k,m or g to represent kilobytes, megabytes, or gigabytes respectively.

- **-A** *device*

  Scans the *device* for btrfs filesystem.

- **-a**

  Scans all devices present in the system for btrfs filesystem.

- **-c**

  Forces a filesystem sync.

## AVAILABILITY

**btrfsctl** is part of btrfs-tools. Btrfs is currently under heavy development, and not suitable for any uses other than benchmarking and review. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.

## SEE ALSO

[**mkfs.btrfs**(8)](/mkfs.btrfs/8.md)
