btrfs-property - Linux
Overview
btrfs-property manipulates properties, key-value pairs associated with Btrfs filesystems and objects. Properties provide extended metadata for files and directories, enabling finer filesystem control and management.
Syntax
btrfs property <command> <path/to/object> <property>
Options/Flags
--clear
: Clear the specified property.--create
: Create a new property with the specified value.--get
: Retrieve the value of the specified property.--list
: List all properties of the specified object.
Examples
- List all properties of a file:
btrfs property list /path/to/file
- Create a
rosetta
property with the valuestone
for a file:
btrfs property create /path/to/file rosetta stone
- Retrieve the value of the
rosetta
property for a directory:
btrfs property get /path/to/directory rosetta
- Clear the
rosetta
property from a file:
btrfs property clear /path/to/file rosetta
Common Issues
- Property names are case-sensitive.
- The default value of a property is an empty string.
- Some properties are immutable and cannot be modified.
Integration
btrfs-property can be used in conjunction with other Btrfs tools to manage filesystem properties efficiently. For example, to create a subvolume with a custom property, use:
btrfs subvolume create --property rosetta=stone new_subvolume
Related Commands
- btrfs: Main Btrfs management tool.
- btrfs-filesystem: Provides filesystem-level information.
- btrfs-subvolume: Manages subvolumes.
For more information, refer to the official Btrfs documentation at https://btrfs.wiki.kernel.org.