{
    "mode": "man",
    "parameter": "xfs_bmap",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/xfs_bmap/8/json",
    "generated": "2026-05-30T07:08:56Z",
    "synopsis": "xfsbmap [ -adelpv ] [ -n numextents ] file\nxfsbmap -V",
    "sections": {
        "NAME": {
            "content": "xfsbmap - print block mapping for an XFS file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xfsbmap [ -adelpv ] [ -n numextents ] file\nxfsbmap -V\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "xfsbmap  prints  the  map  of disk blocks used by files in an XFS filesystem.  The map lists\neach extent used by the file, as well as regions in the file that do not have any correspond‐\ning blocks (holes).  Each line of the listings takes the following form:\n\nextent: [startoffset..endoffset]: startblock..endblock\n\nHoles  are  marked by replacing the startblock..endblock with hole.  All the file offsets and\ndisk blocks are in units of 512-byte blocks, no matter what the filesystem's block size is.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-a",
                    "content": "instead of the default data fork.\n",
                    "flag": "-a"
                },
                {
                    "name": "-e",
                    "content": "flush dirty pages to disk before querying extent data. With the -v option,  the  flags\ncolumn will show which extents have not yet been allocated.\n",
                    "flag": "-e"
                },
                {
                    "name": "-l",
                    "content": "<nblocks>  blocks\n\nwill  be  appended to each line.  nblocks is the length of the extent described on the\nline in units of 512-byte blocks.\n\nThis flag has no effect if the -v option is used.\n",
                    "flag": "-l"
                },
                {
                    "name": "-n",
                    "content": "If this option is given, xfsbmap will display at most numextents extents. In the ab‐\nsence of -n, xfsbmap will display all extents in the file.\n",
                    "flag": "-n"
                },
                {
                    "name": "-p",
                    "content": "not contain written data. With the -v option, the flags column will show which extents\nare preallocated/unwritten.\n",
                    "flag": "-p"
                },
                {
                    "name": "-v",
                    "content": "mation is appended to each line in the following form:\n\nagno (startagoffset..endagoffset) nblocks flags\n\nA second -v option will print out the flags legend.\n",
                    "flag": "-v"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                }
            ]
        },
        "SEE ALSO": {
            "content": "xfsfsr(8), xfs(5).\n\n\n\nxfsbmap(8)",
            "subsections": []
        }
    },
    "summary": "xfsbmap - print block mapping for an XFS file",
    "flags": [
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "instead of the default data fork."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "flush dirty pages to disk before querying extent data. With the -v option, the flags column will show which extents have not yet been allocated."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "<nblocks> blocks will be appended to each line. nblocks is the length of the extent described on the line in units of 512-byte blocks. This flag has no effect if the -v option is used."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "If this option is given, xfsbmap will display at most numextents extents. In the ab‐ sence of -n, xfsbmap will display all extents in the file."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "not contain written data. With the -v option, the flags column will show which extents are preallocated/unwritten."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "mation is appended to each line in the following form: agno (startagoffset..endagoffset) nblocks flags A second -v option will print out the flags legend."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "xfsfsr",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsfsr/8/json"
        },
        {
            "name": "xfs",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/xfs/5/json"
        },
        {
            "name": "xfsbmap",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsbmap/8/json"
        }
    ]
}