Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Why is defragmentation unnecessary?

I have an older hard drive that might be in need of defragging. how would I go about doing that with Ubuntu? I have done it in windows, but I have no idea on how to do it on Ubuntu. Thanks!

share|improve this question
add comment

marked as duplicate by Uri Herrera, Tom Brossman, Ringtail, psusi, fossfreedom Dec 15 '12 at 10:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 1 down vote accepted

If your hard disk is formatted in ext3 or ext4 there is no need to defragment.

If it is an NTFS partition, then you might need to defragment it but there are no defragmentation tools for linux as far as I know. In this case you have several options depending on your setup. Is it an external drive or an internal one?

  • If you have a dual-boot system, use Windows to defrag.
  • If you are only using Ubuntu, consider reformatting to ext4 to avoid the need to defragment in the first place.
  • If it is an external drive and you want to be able to use it on windows pc's, then formatting to ext4 is not such a good option. So if this is the case you might consider defragmenting on someone else's computer or occasionally copy all files on your pc, quick format your disk and copy everything back. This would effectively remove fragmented files.
share|improve this answer
    
How would I go about formatting it to ext4? –  iKiel2012 Dec 14 '12 at 22:56
    
On Ubuntu 12.10 open Disks and format your partition from there. On 12.04 open Disk Utility. –  To Do Dec 14 '12 at 22:57
    
Thanks! apparently, my disk was already formatted to that. –  iKiel2012 Dec 14 '12 at 23:05
add comment

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