e4defrag

Defragment an ext4 filesystem. More information: <https://manned.org/e4defrag>.

Install

All systems
curl cmd.cat/e4defrag.sh
Debian Debian
apt-get install e2fsprogs
Ubuntu
apt-get install e2fsprogs
Alpine
apk add e2fsprogs
Arch Arch Linux
pacman -S e2fsprogs
image/svg+xml Kali Linux
apt-get install e2fsprogs
CentOS
yum install e2fsprogs
Fedora
dnf install e2fsprogs
Windows (WSL2)
sudo apt-get update sudo apt-get install e2fsprogs
OS X
brew install e2fsprogs
Raspbian
apt-get install e2fsprogs
Docker
docker run cmd.cat/e4defrag e4defrag powered by Commando

Defragment an ext4 filesystem. More information: <https://manned.org/e4defrag>.

  • Defragment the filesystem:
    e4defrag /dev/sdXN
  • See how fragmented a filesystem is:
    e4defrag -c /dev/sdXN
  • Print errors and the fragmentation count before and after each file:
    e4defrag -v /dev/sdXN

© tl;dr; authors and contributors