{
    "mode": "man",
    "parameter": "filefrag",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/filefrag/8/json",
    "generated": "2026-10-09T16:49:39Z",
    "synopsis": "filefrag [ -bblocksize ] [ -BeEkPsvVxX ] [ files...  ]",
    "sections": {
        "NAME": {
            "content": "filefrag - report on file fragmentation\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "filefrag [ -bblocksize ] [ -BeEkPsvVxX ] [ files...  ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "filefrag reports on how badly fragmented a particular file might be.  It makes allowances for\nindirect blocks for ext2 and ext3 file systems, but can be used on files for any file system.\n\nThe  filefrag  program  initially  attempts  to get the extent information using FIEMAP ioctl\nwhich is more efficient and faster.  If FIEMAP is not supported then filefrag will fall  back\nto using FIBMAP.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-B",
                    "content": "poses.\n",
                    "flag": "-B"
                },
                {
                    "name": "-b_",
                    "content": "Use blocksize in bytes, or with [KMG] suffix, up to 1GB for output instead of the file\nsystem blocksize.  For compatibility with earlier versions of filefrag,  if  blocksize\nis unspecified it defaults to 1024 bytes.  Since blocksize is an optional argument, it\nmust be added without any space after -b.\n"
                },
                {
                    "name": "-e",
                    "content": "",
                    "flag": "-e"
                },
                {
                    "name": "-E",
                    "content": "all kernels, and is only supported on ext4 file systems.\n",
                    "flag": "-E"
                },
                {
                    "name": "-k",
                    "content": "",
                    "flag": "-k"
                },
                {
                    "name": "-P",
                    "content": "nels, and is only supported on ext4 file systems.\n",
                    "flag": "-P"
                },
                {
                    "name": "-s",
                    "content": "",
                    "flag": "-s"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-V",
                    "content": "flags that are understood by the current version.\n",
                    "flag": "-V"
                },
                {
                    "name": "-x",
                    "content": "",
                    "flag": "-x"
                },
                {
                    "name": "-X",
                    "content": "",
                    "flag": "-X"
                }
            ]
        },
        "AUTHOR": {
            "content": "filefrag was written by Theodore Ts'o <tytso@mit.edu>.\n\nE2fsprogs version 1.47.0                    February 2023                                FILEFRAG(8)",
            "subsections": []
        }
    },
    "summary": "filefrag - report on file fragmentation",
    "flags": [
        {
            "flag": "-B",
            "long": null,
            "arg": null,
            "description": "poses."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Use blocksize in bytes, or with [KMG] suffix, up to 1GB for output instead of the file system blocksize. For compatibility with earlier versions of filefrag, if blocksize is unspecified it defaults to 1024 bytes. Since blocksize is an optional argument, it must be added without any space after -b."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-E",
            "long": null,
            "arg": null,
            "description": "all kernels, and is only supported on ext4 file systems."
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "nels, and is only supported on ext4 file systems."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "flags that are understood by the current version."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-X",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": []
}