Steven's Blog

A Dream Land of Peace!

Find the Common Lines in Multiple Files

What if I want to find the lines exist in all the given files under linux. Of course I can write a small script but I do not want to do that, cause I am sure there are commands for this kind of task.

grep -F -x -f file1 file2 ...

you can refer to the following page for more details.