'Finding difference between two text files with millions of rows

I have two text files, text file 1 contains all the rows and text file 2 is a subset of file 1. How do I compare the two line by line and return rows in file 1 that doesn't exist in file 2?

#|# is the delimiter and the first row is the header.

Format:

DB#|#row_id#|#Date#|#Time#|#Entry#|#Source#|#Date2
GP120#|#1#|#2021-10-01#|#16:51:01#|#1#|#REPO 3.0 SETUP#|#2021-06-29 00:00:00
r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source