{
    "content": [
        {
            "type": "text",
            "text": "# btrfs(8) (man)\n\n## TLDR\n\n> A filesystem based on the copy-on-write (COW) principle for Linux.\n\n- Create subvolume:\n  `sudo btrfs {{su|subvolume}} {{c|create}} {{path/to/subvolume}}`\n- List subvolumes:\n  `sudo btrfs {{su|subvolume}} {{l|list}} {{path/to/mount_point}}`\n- Show space usage information:\n  `sudo btrfs {{f|filesystem}} df {{path/to/mount_point}}`\n- Enable quota:\n  `sudo btrfs {{qu|quota}} {{e|enable}} {{path/to/subvolume}}`\n- Show quota:\n  `sudo btrfs {{qg|qgroup}} {{s|show}} {{path/to/subvolume}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** btrfs - a toolbox to manage btrfs filesystems\n\n**Synopsis:** btrfs <command> [<args>]\n\n## See Also\n\n- btrfs-balance(8)\n- btrfs-check(8)\n- btrfs-convert(8)\n- btrfs-device(8)\n- btrfs-filesystem(8)\n- btrfs-inspect-internal(8)\n- btrfs-property(8)\n- btrfs-qgroup(8)\n- btrfs-quota(8)\n- btrfs-receive(8)\n- btrfs-replace(8)\n- btrfs-rescue(8)\n- btrfs-restore(8)\n- btrfs-scrub(8)\n- btrfs-send(8)\n- btrfs-subvolume(8)\n- btrfstune(8)\n- mkfs.btrfs(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (10 lines)\n- **COMMAND SYNTAX** (13 lines)\n- **COMMANDS** (1 lines) — 15 subsections\n  - balance (4 lines)\n  - check (4 lines)\n  - device (4 lines)\n  - filesystem (4 lines)\n  - inspect-internal (4 lines)\n  - property (4 lines)\n  - qgroup (4 lines)\n  - quota (4 lines)\n  - receive (4 lines)\n  - replace (4 lines)\n  - rescue (4 lines)\n  - restore (4 lines)\n  - scrub (4 lines)\n  - send (4 lines)\n  - subvolume (4 lines)\n- **STANDALONE TOOLS** (6 lines) — 7 subsections\n  - btrfs-convert (2 lines)\n  - btrfstune (2 lines)\n  - btrfs-select-super (2 lines)\n  - btrfs-find-root (4 lines)\n  - btrfs-debug-tree (2 lines)\n  - btrfs-show-super (2 lines)\n  - btrfs-zero-log (7 lines)\n- **EXIT STATUS** (2 lines)\n- **AVAILABILITY** (3 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\nbtrfs - a toolbox to manage btrfs filesystems\n\n### SYNOPSIS\n\nbtrfs <command> [<args>]\n\n### DESCRIPTION\n\nThe btrfs utility is a toolbox for managing btrfs filesystems. There are command groups to\nwork with subvolumes, devices, for whole filesystem or other specific actions. See section\nCOMMANDS.\n\nThere are also standalone tools for some tasks like btrfs-convert or btrfstune that were\nseparate historically and/or haven’t been merged to the main utility. See section STANDALONE\nTOOLS for more details.\n\nFor other topics (mount options, etc) please refer to the separate manual page btrfs(5).\n\n### COMMAND SYNTAX\n\nAny command name can be shortened so long as the shortened form is unambiguous, however, it\nis recommended to use full command names in scripts. All command groups have their manual\npage named btrfs-<group>.\n\nFor example: it is possible to run btrfs sub snaps instead of btrfs subvolume snapshot. But\nbtrfs file s is not allowed, because file s may be interpreted both as filesystem show and as\nfilesystem sync.\n\nIf the command name is ambiguous, the list of conflicting options is printed.\n\nFor an overview of a given command use btrfs command --help or btrfs [command...] --help\n--full to print all available options.\n\n### COMMANDS\n\n#### balance\n\nBalance btrfs filesystem chunks across single or several devices.\n\nSee btrfs-balance(8) for details.\n\n#### check\n\nDo off-line check on a btrfs filesystem.\n\nSee btrfs-check(8) for details.\n\n#### device\n\nManage devices managed by btrfs, including add/delete/scan and so on.\n\nSee btrfs-device(8) for details.\n\n#### filesystem\n\nManage a btrfs filesystem, including label setting/sync and so on.\n\nSee btrfs-filesystem(8) for details.\n\n#### inspect-internal\n\nDebug tools for developers/hackers.\n\nSee btrfs-inspect-internal(8) for details.\n\n#### property\n\nGet/set a property from/to a btrfs object.\n\nSee btrfs-property(8) for details.\n\n#### qgroup\n\nManage quota group(qgroup) for btrfs filesystem.\n\nSee btrfs-qgroup(8) for details.\n\n#### quota\n\nManage quota on btrfs filesystem like enabling/rescan and etc.\n\nSee btrfs-quota(8) and btrfs-qgroup(8) for details.\n\n#### receive\n\nReceive subvolume data from stdin/file for restore and etc.\n\nSee btrfs-receive(8) for details.\n\n#### replace\n\nReplace btrfs devices.\n\nSee btrfs-replace(8) for details.\n\n#### rescue\n\nTry to rescue damaged btrfs filesystem.\n\nSee btrfs-rescue(8) for details.\n\n#### restore\n\nTry to restore files from a damaged btrfs filesystem.\n\nSee btrfs-restore(8) for details.\n\n#### scrub\n\nScrub a btrfs filesystem.\n\nSee btrfs-scrub(8) for details.\n\n#### send\n\nSend subvolume data to stdout/file for backup and etc.\n\nSee btrfs-send(8) for details.\n\n#### subvolume\n\nCreate/delete/list/manage btrfs subvolume.\n\nSee btrfs-subvolume(8) for details.\n\n### STANDALONE TOOLS\n\nNew functionality could be provided using a standalone tool. If the functionality proves to\nbe useful, then the standalone tool is declared obsolete and its functionality is copied to\nthe main tool. Obsolete tools are removed after a long (years) depreciation period.\n\nTools that are still in active use without an equivalent in btrfs:\n\n#### btrfs-convert\n\nin-place conversion from ext2/3/4 filesystems to btrfs\n\n#### btrfstune\n\ntweak some filesystem properties on a unmounted filesystem\n\n#### btrfs-select-super\n\nrescue tool to overwrite primary superblock from a spare copy\n\n#### btrfs-find-root\n\nrescue helper to find tree roots in a filesystem\n\nDeprecated and obsolete tools:\n\n#### btrfs-debug-tree\n\nmoved to btrfs inspect-internal dump-tree. Removed from source distribution.\n\n#### btrfs-show-super\n\nmoved to btrfs inspect-internal dump-super, standalone removed.\n\n#### btrfs-zero-log\n\nmoved to btrfs rescue zero-log, standalone removed.\n\nFor space-constrained environments, it’s possible to build a single binary with functionality\nof several standalone tools. This is following the concept of busybox where the file name\nselects the functionality. This works for symlinks or hardlinks. The full list can be\nobtained by btrfs help --box.\n\n### EXIT STATUS\n\nbtrfs returns a zero exit status if it succeeds. Non zero is returned in case of failure.\n\n### AVAILABILITY\n\nbtrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for\nfurther details.\n\n### SEE ALSO\n\nbtrfs(5), btrfs-balance(8), btrfs-check(8), btrfs-convert(8), btrfs-device(8),\nbtrfs-filesystem(8), btrfs-inspect-internal(8), btrfs-property(8), btrfs-qgroup(8),\nbtrfs-quota(8), btrfs-receive(8), btrfs-replace(8), btrfs-rescue(8), btrfs-restore(8),\nbtrfs-scrub(8), btrfs-send(8), btrfs-subvolume(8), btrfstune(8), mkfs.btrfs(8)\n\n\n\nBtrfs v5.16.2                                02/16/2022                                     BTRFS(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "btrfs",
        "section": "8",
        "mode": "man",
        "summary": "btrfs - a toolbox to manage btrfs filesystems",
        "synopsis": "btrfs <command> [<args>]",
        "tldr_summary": "A filesystem based on the copy-on-write (COW) principle for Linux.",
        "tldr_examples": [
            {
                "description": "Create subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{c|create}} {{path/to/subvolume}}"
            },
            {
                "description": "List subvolumes",
                "command": "sudo btrfs {{su|subvolume}} {{l|list}} {{path/to/mount_point}}"
            },
            {
                "description": "Show space usage information",
                "command": "sudo btrfs {{f|filesystem}} df {{path/to/mount_point}}"
            },
            {
                "description": "Enable quota",
                "command": "sudo btrfs {{qu|quota}} {{e|enable}} {{path/to/subvolume}}"
            },
            {
                "description": "Show quota",
                "command": "sudo btrfs {{qg|qgroup}} {{s|show}} {{path/to/subvolume}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "btrfs-balance",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-balance/8/json"
            },
            {
                "name": "btrfs-check",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-check/8/json"
            },
            {
                "name": "btrfs-convert",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-convert/8/json"
            },
            {
                "name": "btrfs-device",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-device/8/json"
            },
            {
                "name": "btrfs-filesystem",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-filesystem/8/json"
            },
            {
                "name": "btrfs-inspect-internal",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-inspect-internal/8/json"
            },
            {
                "name": "btrfs-property",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-property/8/json"
            },
            {
                "name": "btrfs-qgroup",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-qgroup/8/json"
            },
            {
                "name": "btrfs-quota",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-quota/8/json"
            },
            {
                "name": "btrfs-receive",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-receive/8/json"
            },
            {
                "name": "btrfs-replace",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-replace/8/json"
            },
            {
                "name": "btrfs-rescue",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-rescue/8/json"
            },
            {
                "name": "btrfs-restore",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-restore/8/json"
            },
            {
                "name": "btrfs-scrub",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-scrub/8/json"
            },
            {
                "name": "btrfs-send",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-send/8/json"
            },
            {
                "name": "btrfs-subvolume",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-subvolume/8/json"
            },
            {
                "name": "btrfstune",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfstune/8/json"
            },
            {
                "name": "mkfs.btrfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "COMMAND SYNTAX",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "balance",
                        "lines": 4
                    },
                    {
                        "name": "check",
                        "lines": 4
                    },
                    {
                        "name": "device",
                        "lines": 4
                    },
                    {
                        "name": "filesystem",
                        "lines": 4
                    },
                    {
                        "name": "inspect-internal",
                        "lines": 4
                    },
                    {
                        "name": "property",
                        "lines": 4
                    },
                    {
                        "name": "qgroup",
                        "lines": 4
                    },
                    {
                        "name": "quota",
                        "lines": 4
                    },
                    {
                        "name": "receive",
                        "lines": 4
                    },
                    {
                        "name": "replace",
                        "lines": 4
                    },
                    {
                        "name": "rescue",
                        "lines": 4
                    },
                    {
                        "name": "restore",
                        "lines": 4
                    },
                    {
                        "name": "scrub",
                        "lines": 4
                    },
                    {
                        "name": "send",
                        "lines": 4
                    },
                    {
                        "name": "subvolume",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "STANDALONE TOOLS",
                "lines": 6,
                "subsections": [
                    {
                        "name": "btrfs-convert",
                        "lines": 2
                    },
                    {
                        "name": "btrfstune",
                        "lines": 2
                    },
                    {
                        "name": "btrfs-select-super",
                        "lines": 2
                    },
                    {
                        "name": "btrfs-find-root",
                        "lines": 4
                    },
                    {
                        "name": "btrfs-debug-tree",
                        "lines": 2
                    },
                    {
                        "name": "btrfs-show-super",
                        "lines": 2
                    },
                    {
                        "name": "btrfs-zero-log",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}