If you want to see all unique lines within a file, use the uniq command within Linux/Unix. To do so, just execute uniq against a file.
#uniq /var/log/messages
Or, less elegantly...
#cat /var/log/messages | uniq
This will also work with standard input.