The process of rearranging the files on a hard disk so that all the files are as contiguous as possible, and that the remaining free space is also contiguous.