Does Moving a File/Folder Makes Disk Fragmented? [Duplicate]

Does moving a file/folder causes fragmentation in Disk on Ubuntu 20.04?

0

In this article on Quora 'Does disk fragmentation occur in Linux? If not, why?' it explains that Linux (EXT4) does not fragment any disk. Windows however will (FAT 32/NTFS).

Fragmentation only happens on HDDs (the ones with platters and readheads in them).So you can defrag them once in a while for better performance.

Fragmentation does not happen on SSDs. Don't perform a defragmentation on these kind of disks. It is useless and the read/writes shorten its lifespan.

So it really depends on what kind of disk(s) you have in your system and what filesystem you use.

2

moving a file with the mv command on the same disk does not move data. It changes only the directory entries relating to this data. Hence, it cannot fragment a disk.

6
Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest