I have two large files A and B
I need to delete lines that appear in file B from file A and save the result
to file C
I have tried comm -23 file1
comm -23 file1
As you mentioned, since comm needs sorted file to fetch the diff you can do in-line sorting before using comm like this :
comm
sort
comm -23 <(sort file1) <(sort file2) > fileC