Don't forget "tac" - the reverse of "cat".
The real opposite of cat would be a putative 'trunc'. So if you typed
$ cat somefile
It would print the file to your terminal. And then if you said $ trunc somefile
The printed lines would be removed from your terminal. :)Neilk was just humorously pointing out that since cat stands for concatenate, its reverse should be truncate, and since cat is often abused to print a single file to a terminal this fictional trunc should "unprint" it.
Arguably you could view 'comm -3' as the reverse of cat.
# output is all the lines of file1 and file2
cat file1 file2
# output is the lines in file1 not in file 2, and vice verse
comm -3 file1 file2I almost resisted the urge, but no, the pedant in me :-) insists on pointing out that cat is short for catenate