Score:1

Does moving a file/folder makes disk fragmented?

de flag

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

Score:3
eg flag

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.

ar flag
NVMes are a specific kind of controller interface for Solid State Drives (SSDs). The other kind of controller interface for SSDs and HDDs are called SATA. There is nothing called SDD.
Joepie Es avatar
eg flag
@user68186 Thanks for editing my answer. And youŕe right about the controllers SATA and NVME.
Score:2
cn flag

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.

Soren A avatar
mx flag
Moving within same partition / filesystem does not move data physically. Moving between partitions / filesystems does !!
Bruni avatar
cn flag
@SorenA Thank you. I am well aware of thatm, but will clarify. Moving between partitions is a smaller problem with regard to fragmentation in any case...Oh I just saw, I already had mentioned it (...I write **on the same disk**)
Soren A avatar
mx flag
You are wrong. Why are moving between partitions on same disks a smaller problem than movin between disk in relation to fragmentation ?
Bruni avatar
cn flag
@SorenA You are right on this. I made a logical mistake on this. The answer is correct though, even if not complete.
ByteManager avatar
de flag
Thanks everyone for information. I'm new to Linux and Ubuntu. I want to know whether drag-and-dropping a file/folder works in a similar way (does it only changes the directory entries) as using `mv` command does.
Bruni avatar
cn flag
@ByteManager I am not sure about drag and drop (it is not in my workflow). Cut and paste on the same partition works like move (at least on KDE)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.