I need to defragment external HDD. I use Kubuntu 16.04.6 LTS. Is there a defragmenting tool to do that or should I go to a friend with Windows? Or maybe a Windows tool that works via Wine?
Asked
Active
Viewed 3,602 times
0
-
You haven't said what type of fs (file-system), so maybe https://askubuntu.com/questions/221079/how-to-defrag-an-ext4-filesystem – guiverc Jun 22 '19 at 11:36
2 Answers
0
If you have enough free disk space, you can use parted or gparted to shrink the fragmented partition by a little more than half. Then create a new ntfs partition to fill the unallocated. Format the new partition. Copy all of the files (not using dd, but with a file copy command like "cp -a") from the old partition to the new one. Now delete the fragmented partition and expand the new partition to use the original amount of disk space. The new partition will be defragmented.

Eric Mintz
- 2,516
- 12
- 24
0
If your current filesystem is NTFS, you must use Windows to defragment. Because of the way NTFS works, it will become fragmented again very soon.
For EXT4 there is e4defrag that runs natively and does a good job. EXT4 filesystems are also less prone to fragmentation.

Ferdi
- 517
- 2
- 5
-
Can it be done from a Windows live CD/DVD/USB (without actually having to install or having a Windows?) – jave.web Dec 05 '21 at 23:47