awk 'NR==FNR{a[$0]=$0;next}$0 in a{print}' file2 file1