Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a flash drive that I use for general use around the house and at school. I use exclusively Ubuntu, but at school and on other family computers, they use Winblows. Therefore, my flash drive is in FAT32 format for easy reading on both types of machines. However, I want to be sure that my drive can be defragmented. Is there any way to do this on Ubuntu?

share|improve this question
isn't unecessay excessive writes on flash media considered a bad idea? – Rony May 16 '12 at 5:27

2 Answers 2

up vote 2 down vote accepted

Moving all the data off the USB drive and then copying it back again will ensure that there are no fragmented files.

However, there's absolutely no point in doing this since fragmentation does not affect performance of solid state drives

share|improve this answer
Never knew that about Solid State Drives...You learn something new everyday! :) And I suppose that would prevent fragmentation. Great answer Sergey! – Ryan McClure May 16 '12 at 5:29
Fragmentation affects performance of rotational drives because the reading head has to physically move from one location to another in order to read a fragmented file. There are no moving heads in a SSD, that's why they're called "solid-state drives". But, say, if you have a floppy :) - removing all files from it returns it to its pristine un-fragmented state. – Sergey May 16 '12 at 5:35
I'm a novice to a lot of hardware-related things. I understand how data is read from a drive with a stylus, such as a HDD. But, as for SSDs, how do computers read information from them? How is it stored? I would look it up but you seem to know a great deal about this kind of stuff :) – Ryan McClure May 16 '12 at 5:37

If your computer is faster enough , e.g has cpu VT support

Launch a Windows virtual machine to do the defragment stuff for your USB key , e.g VBOX

share|improve this answer
I never considered the possibility of using virtualization for it. Great idea! – Ryan McClure May 16 '12 at 5:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.