EVERYTHING XIAOMI
Get listed

e4defrag

e4defrag is a free, open-source Linux utility for defragmenting extent-based files on ext4 filesystems.

Place
#10 of 20
Score
5.8
e4defrag's website

What e4defrag 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 a device mounted as ext4. Its aim is to give target files more contiguous blocks, which the manual associates with improved file access speed. The -c option reports fragmentation counts and a score without defragmenting; the score is printed only when the check is run as root. With -v, the utility prints errors and each file’s fragmentation count before and after defragmentation.

The utility checks that the filesystem is 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 device or mount-point target excludes files belonging to another device’s mount point. Fragmented or insufficient free space can prevent improvement. Non-privileged users can run it on their own files, and it can run while another application uses a file, though shared memory and disk bandwidth may slow both.

Good

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

Watch out

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

Who it suits

e4defrag suits Linux users who need to check or defragment supported files on ext4. It is not suited to the unsupported file types listed or targets on other filesystem types.

Verdict

e4defrag offers targeted defragmentation and a separate fragmentation check for supported ext4 files. Unsupported file types and filesystem conditions can limit what it can improve.

Plans and prices

From e4defrag's own pricing page, checked 4 Oct 2026.

All about pricing
PlanPriceWhat it gives you
e4defragFreeExt4 files only · swap files, files in lost+found, and files allocated in indirect blocks are unsupported

The facts

Each one read from e4defrag's own pages, with the date it was checked.

What it does

Authors
The e4defrag source credits Akira Fujita and Takashi Sato as authors.checked 4 Oct 2026
Defragmentation
It aims to give targeted files more contiguous blocks, which the manual says improves file access speed.checked 4 Oct 2026
Fragmentation check
The -c option reports current and ideal fragmentation counts and a fragmentation score without defragmenting the target.checked 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.checked 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.checked 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.checked 4 Oct 2026
Purpose
e4defrag is an online defragmenter for extent based files on ext4 filesystems.checked 4 Oct 2026
Support
The project README directs bug reports for its programs to Ted Ts’o by email.checked 4 Oct 2026
Supported filesystem
The source checks for ext4 and reports an error when the filesystem is not ext4.checked 4 Oct 2026
Targets
It accepts a regular file, directory, or device mounted as ext4; a directory target covers its files.checked 4 Oct 2026
Unsupported files
The manual says e4defrag does not support swap files, files in lost+found, or files allocated in indirect blocks.checked 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.checked 4 Oct 2026
Verbose output
The -v option prints error messages and each file’s fragmentation count before and after defragmentation.checked 4 Oct 2026

Money

Free space
Fragmented or insufficient filesystem free space can prevent e4defrag from improving a file’s fragmentation.checked 4 Oct 2026

Alternatives to e4defrag

All alternatives
  1. 1

    Avidemux

    Free planOpen sourceWebLinuxmacOSWindows
    7.3Free plan
  2. 2

    Btrfsmaintenance

    Free planOpen sourceLinuxSelf-hosted
    6.9Free plan
  3. 3Disk SpeedUp logo

    Disk SpeedUp

    Free planWindows
    6.6Free plan
  4. 4Autoruns logo

    Autoruns

    Free planWindows
    6.3Free plan
  5. 5

    DymaxIO

    Windows
    6.2From $69 a year
  6. 6

    Windows File Recovery

    Free planWindows
    6.2Free plan