btrfs-property
Get and set properties on btrfs filesystem objects
TLDR
List available properties for a btrfs object
$ sudo btrfs property list [path/to/btrfs_object]
Get all properties for a btrfs object$ sudo btrfs property get [path/to/btrfs_object]
Get the label property for a filesystem$ sudo btrfs property get [path/to/btrfs_filesystem] label
Get properties for a specific object type$ sudo btrfs property get -t [subvol|filesystem|inode|device] [path/to/btrfs_filesystem]
Set compression for a file or directory$ sudo btrfs property set [path/to/btrfs_inode] compression [zstd|zlib|lzo|none]
SYNOPSIS
btrfs property subcommand [options] path [property [value]]
DESCRIPTION
btrfs property manages properties on btrfs filesystem objects including files, directories, subvolumes, filesystems, and devices. Properties control behavior like compression, read-only status, and labels.
Different object types support different properties. The list command shows what properties are available for each object.
PARAMETERS
-t type
Object type: subvol, filesystem, inode, or device
SUBCOMMANDS
list
List available properties and descriptionsget
Get property valuesset
Set a property value
PROPERTIES
compression
Compression algorithm for files: zstd, zlib, lzo, nonelabel
Filesystem label (filesystem property)ro
Read-only status (subvolume property)
CAVEATS
Setting compression on a directory only affects new files; existing files need explicit recompression. Not all properties are writable. Some operations require root privileges.
SEE ALSO
btrfs(8), btrfs-subvolume(8), chattr(1)
