Skip to content

Instantly share code, notes, and snippets.

@rmi1974
rmi1974 / defrag_ext4_filesystem.md
Last active May 2, 2024 22:30
How to optimize / defrag ext4 filesystem #ext4 #commandlinefu

How to optimize / defrag ext4 filesystem

Make sure the target filesystem is sane

Open up the terminal and run:

sudo fsck.ext4 -y -f -v /dev/<disk/partition>