Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between contents of two directories

Tags:

linux

I have find the difference in all the cpp, header and shell scripts files between two directories which can have subdirectories as well.

like image 804
Nithesh Shetty Avatar asked Sep 12 '12 06:09

Nithesh Shetty


People also ask

How do I compare two folders in differences?

Using Meld Visual Diff and Merge Tool Click on directory comparison and move to the next interface. Select the directories you want to compare, note that you can add a third directory by checking the option “3-way Comparison”. Once you selected the directories, click on “Compare”.

Can you use diff on directories?

You can use diff to compare some or all of the files in two directory trees. When both file name arguments to diff are directories, it compares each file that is contained in both directories, examining file names in alphabetical order as specified by the LC_COLLATE locale category.

How do I diff two directories in UNIX?

Use the dircmp command to compare two directories specified by the Directory1 and Directory2 parameters and write information about their contents to standard output. First, the dircmp command compares the file names in each directory.


1 Answers

You can use the recursive option of diff

diff -r old_dir new_dir
like image 133
sylvain.joyeux Avatar answered Sep 28 '22 02:09

sylvain.joyeux