This question already has an answer here:
I need to compare two txt files. Every line of both txt files contain entries. One entry per line. The new file contains entries the old one lacks. I have tried to use
vimdiff but these don't work because the lines may be in different order.
alpha beta gama
delta omega beta alpha gama rho phi
vimdiff compares line 1 with line 1, line 2 with line 2, etc and even if I sort both files the comparison will not succeed because I can have new items between the sorted versions, like "alpha, beta, rho" versus "alpha, beta, gama, rho".
How do I get a list of entries that the new file have that the old one does not?