LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

e2freefrag

analyze ext filesystem free space fragmentation

TLDR

Check free space fragmentation
$ e2freefrag [/dev/sdXN]
copy
Check with specific chunk size
$ e2freefrag -c [chunk_size_in_kb] [/dev/sdXN]
copy

SYNOPSIS

e2freefrag [options] device

DESCRIPTION

e2freefrag prints free space fragmentation information for ext2/ext3/ext4 filesystems. It shows how many free blocks are available as contiguous and aligned free space in histogram format.The tool analyzes the filesystem's free space distribution, reporting statistics about chunk sizes and their frequency. This information helps assess filesystem health and determine if defragmentation might improve performance.Useful for identifying fragmentation patterns that could impact sequential I/O performance, particularly on systems with large files or database workloads.

PARAMETERS

-c chunkkb_

Report the number of free chunks of the given size (in KB). Must be a power of two and larger than the filesystem block size.
-h
Display usage information.
device
Filesystem device (e.g. /dev/sda1) to analyze.

INSTALL

sudo apt install e2fsprogs
copy
sudo dnf install e2fsprogs
copy
sudo pacman -S e2fsprogs
copy
sudo apk add e2fsprogs-extra
copy
sudo zypper install e2fsprogs
copy
brew install e2fsprogs
copy
nix profile install nixpkgs#e2fsprogs
copy

CAVEATS

Filesystem should be unmounted or mounted read-only for accurate results. Part of e2fsprogs package.

SEE ALSO

e4defrag(8), dumpe2fs(8), e2fsck(8), debugfs(8), tune2fs(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid