Common Lines in a file, reverse diff

I had two big directories and I wanted to know the common files in each directory, it was like a reverse diff.

On Linux you can use the command comm, the basic details of the command below.

 comm [-1] [-2] [-3 ] file1 file2
-1 Suppress the output column of lines unique to file1.
-2 Suppress the output column of lines unique to file2.
-3 Suppress the output column of lines duplicated in file1 and file2. 

From looking at the command above you can easily see the differences in just one of the files/directories.

You can read the main man page for teh command but basically these are the main options to use.  If you are new to Linux then I would recommend knowing this one in your toolkit along with diff.

If you’re looking for some other resources or tools for Linux, then check out this log viewer.

I am always interested in your thoughts so if you have any comments or feedback then please feel free to add any comments, or you can mail me  here.

Related Posts Plugin for WordPress, Blogger... 

 

Using Tech To Build A More Efficient Business

Don't Fear The Robot: Put Machines In Charge Of Your Stock