Khánh Đoan
New member
How do I find duplicate rows in Unix?
Answer
How to find duplicate records of a file in Linux?
Answer
How to find duplicate records of a file in Linux?
- Using sort and uniq: $ sort file | uniq -d Linux. …
- awk way of fetching duplicate lines: $ awk ‘{a[$0]++}END{for (i in a)if (a>1)print i;}’ file Linux. …
[*] Using perl way: …
[*] Another perl way: …
[*] A shell script to fetch / find duplicate records: