# xfs_bmap - print block mapping for an XFS file - man(8) - [phpMan]

[_xfs_bmap_(8)](https://www.chedong.com/phpMan.php/man/xfsbmap/8/markdown)                            System Manager's Manual                           [_xfs_bmap_(8)](https://www.chedong.com/phpMan.php/man/xfsbmap/8/markdown)

## NAME
       xfs_bmap - print block mapping for an XFS file

## SYNOPSIS
       **xfs_bmap **[ **-adelpv **] [ **-n _**num_extents_ ] _file_
### xfs_bmap -V

## DESCRIPTION
       **xfs_bmap  **prints  the  map  of disk blocks used by files in an XFS filesystem.  The map lists
       each _extent_ used by the file, as well as regions in the file that do not have any correspond‐
       ing blocks (holes).  Each line of the listings takes the following form:

              _extent_: [_startoffset_.._endoffset_]: _startblock_.._endblock_

       Holes are marked by replacing the _startblock_.._endblock_ with _hole_.  All the file  offsets  and
       disk blocks are in units of 512-byte blocks, no matter what the filesystem's block size is.

## OPTIONS
### -a     
              instead of the default data fork.

### -e     
              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.

### -l     

                   <_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.

### -n _
              If this option is given, **xfs_bmap **will display at most _num_extents_ extents. In the ab‐
              sence of **-n**, **xfs_bmap **will display all extents in the file.

### -p     
              not contain written data. With the **-v **option, the _flags_ column will show which extents
              are preallocated/unwritten.

### -v     
              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.

### -V     

## SEE ALSO
       [**xfs_fsr**(8)](https://www.chedong.com/phpMan.php/man/xfsfsr/8/markdown), [**xfs**(5)](https://www.chedong.com/phpMan.php/man/xfs/5/markdown).

                                                                                         [_xfs_bmap_(8)](https://www.chedong.com/phpMan.php/man/xfsbmap/8/markdown)
