Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Why is defragmentation unnecessary?

This could be for any file system but EXT4 works.

Does Ubuntu need to be defragged like windows. Does it do this on its own.

share|improve this question

marked as duplicate by Marco Ceppi Jun 21 '11 at 15:47

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.

up vote 4 down vote accepted

Most Linux file systems avoid fragmentation to begin with*, so you don't need to defrag Ubuntu under normal circumstances.

*This is accomplished in the way files are written to the disk. Mostly files are written in such a manner that they remain contiguous, with some filesystems arranging the inodes to avoid fragmentation, and when it occurs, to keep it to a minimum. Even when files are modified a lot, moved around etc, the filesystem uses the same principles to avoid fragmentation.

See here:

share|improve this answer
How is this done? I am really more intrested on how Ubuntu handles this compared to windows. – Seth Hikari May 10 '11 at 1:35
Windows finds the 1st available space and uses it regardless of size. When the file being written overflows that continuous space it looks for the next available space and so on. A single file can be broken into many pieces. If you will it ignores the fragmentation problem and focuses on filling the physical contiguous disk space. – fragos May 10 '11 at 3:36

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