If you need to compare two text files use 'diff'
and if it is non-text files use 'cmp'. Do a man on both for different options.

Hope this helps.