Anyone got a good way to intentionally fragment a disk?
Formatted FAT, spinning rust, not SSD. Other than "use it for 10 years without defragging". I could write a script that creates, copies, and deletes files around repeatedly I suppose. Anyone got a quicker way? (on Linux)

Β· Β· Web Β· 6 Β· 1 Β· 0

@popey just appending lines to two alternating files should do a good job in purposefully fragmenting FAT

@popey The best way to do this is to create lots of files of exactly the sector size of the fs until the fs is full. Then delete two random files and create one new one with a size equal to the sum of the two deleted files. Repeat until you hate your filesystem enough.

@popey Maybe you could try with the hard drive of one of those dusty Thinkpads you have in a drawer

@popey if you fill most of the space up with a few ISOs (presuming partition is 10-20Gigs?) then just copy a load of files into the remaining free space not sure what happens once full but fragmentation is sure to occur!
What's this all about anyway?

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!