uniq -d file.txt

Category: Text Processing

uniq -d file.txt

Print only duplicate (repeated) lines

Prints only lines that appear more than once (duplicated lines) in the input.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.