Hdd: Defrag
sudo e4defrag /path/to/directory # or entire partition: sudo e4defrag /dev/sdX For XFS:
Never power off or force reboot during a defrag. You can corrupt the filesystem. Let it finish or cancel properly. defrag hdd
1. What is Fragmentation? To understand defragmentation, you must first understand fragmentation. sudo e4defrag /path/to/directory # or entire partition: sudo
However, as you create, delete, and modify files over months or years, gaps appear. The cabinet becomes messy. When you later save a large file, there may not be a single gap large enough to hold it. The operating system is forced to and stuff each piece into different available gaps around the disk. you must first understand fragmentation. However