blob: a6d7b27cbb7d22b46a1441f7862a1021ad996a85 [file] [log] [blame]
Theodore Ts'o96424132003-12-17 10:13:41 -05001.\" -*- nroff -*-
2.TH FILEFRAG 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
3.SH NAME
4filefrag \- report on file fragmentation
5.SH SYNOPSIS
6.B filefrag
7[
Andreas Dilger2508eaa2012-11-22 15:06:12 +00008.BI \-b blocksize
9]
10[
11.B \-BeksvxX
Theodore Ts'o96424132003-12-17 10:13:41 -050012]
13[
14.I files...
15]
16.SH DESCRIPTION
17.B filefrag
18reports on how badly fragmented a particular file might be. It makes
19allowances for indirect blocks for ext2 and ext3 filesystems, but can be
20used on files for any filesystem.
Kalpak Shahe62847c2009-05-02 21:02:29 -040021.PP
22The
23.B filefrag
24program initially attempts to get the
25extent information using FIEMAP ioctl which is more efficient and faster.
26If FIEMAP is not supported then filefrag will fall back to using FIBMAP.
Theodore Ts'o96424132003-12-17 10:13:41 -050027.SH OPTIONS
28.TP
Theodore Ts'o5d5e01d2009-08-15 23:15:44 -040029.B \-B
30Force the use of the older FIBMAP ioctl instead of the FIEMAP ioctl for
31testing purposes.
32.TP
Andreas Dilger2508eaa2012-11-22 15:06:12 +000033.BI \-b blocksize
34Use
35.I blocksize
36in bytes for output instead of the filesystem blocksize.
37For compatibility with earlier versions of
38.BR filefrag ,
39if
40.I blocksize
41is unspecified it defaults to 1024 bytes.
42.TP
43.B \-e
44Print output in extent format, even for block-mapped files.
45.TP
46.BI \-k
47Use 1024\-byte blocksize for output (identical to '\-b 1024').
Kalpak Shahe62847c2009-05-02 21:02:29 -040048.TP
49.B \-s
50Sync the file before requesting the mapping.
51.TP
Theodore Ts'o96424132003-12-17 10:13:41 -050052.B \-v
53Be verbose when checking for file fragmentation.
Kalpak Shahe62847c2009-05-02 21:02:29 -040054.TP
55.B \-x
56Display mapping of extended attributes.
Andreas Dilger2508eaa2012-11-22 15:06:12 +000057.TP
58.B \-X
59Display extent block numbers in hexadecimal format.
Theodore Ts'o96424132003-12-17 10:13:41 -050060.SH AUTHOR
61.B filefrag
62was written by Theodore Ts'o <tytso@mit.edu>.