btrfs-filesystem
Manage btrfs filesystems. tldr-pages
On Linux
Linux
Show filesystem usage (optionally run as root to show detailed information)
btrfs [f [u path/to/btrfs_mountIdentifyShow usage by individual devices
sudo btrfs [f [sh path/to/btrfs_mountIdentifyDefragment a single file on a btrfs filesystem (avoid while a deduplication agent is running)
sudo btrfs [f [de --verbose path/to/fileIdentifyDefragment a directory recursively (does not cross subvolume boundaries)
sudo btrfs [f [de --verbose -r path/to/directoryIdentifyForce syncing unwritten data blocks to disk(s)
sudo btrfs [f [sy path/to/btrfs_mountIdentifySummarize disk usage for the files in a directory recursively
sudo btrfs [f du --summarize path/to/directoryIdentifyCreate a swap file
sudo btrfs [f [m --size 8g --uuid clear path/to/swapfileIdentify