In this tutorial I am going to show you few different techniques to perform defragmentation on files. Before we start, we should mention what the common filesystems like ext2,3,4 do to prevent fragmentation. These filesystems include technique to prevent the effect.