Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Disk Defragmentation Software
  3. e4defrag

e4defrag

What it is

e4defrag is a free, open-source Linux utility for defragmenting extent-based files on ext4 filesystems. It can target a regular file, a directory and its files, or an ext4 device. The utility aims to place file data in more contiguous blocks, which its manual says can improve file access speed. Its -c option reports fragmentation counts and a score without defragmenting the target; the score appears only when the check runs as root. The -v option prints error messages and each file’s fragmentation count before and after defragmentation. e4defrag checks for ext4 and reports an error for other filesystem types. It does not support swap files, files in lost+found, or files allocated in indirect blocks. A target device or mount point does not include files on another device’s mount point. Fragmented or insufficient free space can prevent an improvement. It can run while another application uses a file, though shared memory and disk bandwidth may slow both. Non-privileged users can run it on their own files.

For and against

For

  • Can target a file, directory, or ext4 device.
  • The -c option checks without defragmenting.
  • Verbose mode shows fragmentation counts before and after.
  • Non-privileged users can run it on their own files.

Against

  • Works only with ext4 filesystems.
  • Does not support swap files or files in lost+found.
  • Indirect-block files are unsupported.
  • Insufficient or fragmented free space can prevent improvement.

The verdict

e4defrag provides targeted defragmentation and a separate fragmentation check for ext4 files. Its filesystem and file-type limits, along with free-space requirements, are important to consider before use.

Who it suits

It suits Linux users managing files on ext4 who want to check fragmentation or attempt to make selected files more contiguous. Users who need the fragmentation score should run the check as root.

Plans and prices

e4defrag

Free

Ext4 files only · swap files, files in lost+found, and files allocated in indirect blocks are unsupported

Every plan, in full

On the record

Authors
The e4defrag source credits Akira Fujita and Takashi Sato as authors.github.com · read 4 Oct 2026
Defragmentation
It aims to give targeted files more contiguous blocks, which the manual says improves file access speed.man7.org · read 4 Oct 2026
Fragmentation check
The -c option reports current and ideal fragmentation counts and a fragmentation score without defragmenting the target.man7.org · read 4 Oct 2026
Free space
Fragmented or insufficient filesystem free space can prevent e4defrag from improving a file’s fragmentation.man7.org · read 4 Oct 2026
Other mount points
When given a device or mount point, it does not defragment files belonging to another device’s mount point.man7.org · read 4 Oct 2026
Permissions
Non-privileged users can run it on their own files, but the fragmentation score is not printed for -c runs unless run as root.man7.org · read 4 Oct 2026
Project
The maker’s README describes e2fsprogs as second extended filesystem management programs and says it supplies instructions for building and installing them.github.com · read 4 Oct 2026
Purpose
e4defrag is an online defragmenter for extent based files on ext4 filesystems.man7.org · read 4 Oct 2026
Support
The project README directs bug reports for its programs to Ted Ts’o by email.github.com · read 4 Oct 2026
Supported filesystem
The source checks for ext4 and reports an error when the filesystem is not ext4.github.com · read 4 Oct 2026
Targets
It accepts a regular file, directory, or device mounted as ext4; a directory target covers its files.man7.org · read 4 Oct 2026
Unsupported files
The manual says e4defrag does not support swap files, files in lost+found, or files allocated in indirect blocks.man7.org · read 4 Oct 2026
Use while active
The manual says it is safe to run on a file while another application uses it, though shared memory and disk bandwidth can slow both.man7.org · read 4 Oct 2026
Verbose output
The -v option prints error messages and each file’s fragmentation count before and after defragmentation.man7.org · read 4 Oct 2026

Alternatives to e4defrag

Every alternative, ranked