Originally Posted by saikee
A swap partition is a scratch area for Linux
That is a way to describe it.
It is more precisely a place where the kernel temporarily store memory blocks (and possibly whole files) when there is not enough RAM to hold them.
as there is no need to do defrag with a Linux filing system.
This is neither really true, nor related to the previous statement about the swap.
Filesystems commonly used under Linux (and Unix) are less prone to fragmentation than FAT, as they try to allocate contiguous blocks to growing files in the first place. This is however defeated when the disk is nearly full, so it is wise to avoid using filesystems with less than about 10% of free space.
There are not that much specific tools to defragment a Unix filesystem but a simpler generic way is simply to backup and restore it.