In the maintenance of
file systems,
defragmentation is a process that reduces the amount of
fragmentation. It does this by physically organizing the contents of the
mass storage device used to store
files into the smallest number of contiguous regions (fragments). It also attempts to create larger regions of free space using
compaction to impede the return of fragmentation. Some defragmentation utilities try to keep smaller files within a single directory together, as they are often accessed in sequence.