1FILEFRAG(8)                 System Manager's Manual                FILEFRAG(8)
2
3
4

NAME

6       filefrag - report on file fragmentation
7

SYNOPSIS

9       filefrag [ -bblocksize ] [ -BeEkPsvVxX ] [ files...  ]
10

DESCRIPTION

12       filefrag  reports  on  how badly fragmented a particular file might be.
13       It makes allowances for indirect blocks for ext2 and ext3 file systems,
14       but can be used on files for any file system.
15
16       The  filefrag  program initially attempts to get the extent information
17       using FIEMAP ioctl which is more efficient and faster.   If  FIEMAP  is
18       not supported then filefrag will fall back to using FIBMAP.
19

OPTIONS

21       -B     Force  the  use  of the older FIBMAP ioctl instead of the FIEMAP
22              ioctl for testing purposes.
23
24       -bblocksize
25              Use blocksize in bytes, or with [KMG] suffix, up to 1GB for out‐
26              put  instead  of  the  file system blocksize.  For compatibility
27              with earlier versions of filefrag, if blocksize  is  unspecified
28              it defaults to 1024 bytes.  Since blocksize is an optional argu‐
29              ment, it must be added without any space after -b.
30
31       -e     Print output in extent format, even for block-mapped files.
32
33       -E     Display the contents of ext4's extent status cache.   This  fea‐
34              ture  is  not supported on all kernels, and is only supported on
35              ext4 file systems.
36
37       -k     Use 1024-byte blocksize for output (identical to '-b1024').
38
39       -P     Pre-load the ext4 extent status cache for the file.  This is not
40              supported  on  all  kernels,  and is only supported on ext4 file
41              systems.
42
43       -s     Sync the file before requesting the mapping.
44
45       -v     Be verbose when checking for file fragmentation.
46
47       -V     Print version number of program and library.   If  given  twice,
48              also  print  the FIEMAP flags that are understood by the current
49              version.
50
51       -x     Display mapping of extended attributes.
52
53       -X     Display extent block numbers in hexadecimal format.
54

AUTHOR

56       filefrag was written by Theodore Ts'o <tytso@mit.edu>.
57
58
59
60E2fsprogs version 1.46.5         December 2021                     FILEFRAG(8)
Impressum