Originally Posted by catkin
How can you identify the duplicates? Is the name enough or do you also need to check the size and/or checksum?
I do not understand There are some duplicate files in the different directories. I want to identify them and copy the files to other directory leaving the duplicates in the same dir1. When you identify a file in a sub-directory of dir1 which is a duplicate of a file in dir1, which "other" directory do you want to copy it to and is it OK to change from having two duplicates to having 3 duplicates?
Thanks for your reply.
Identifying duplicate files with name will help me in first place. I have a directory in which i have many sub-directories under which i have *.i and *.o files. Now i want to identify the duplicate files and do the following,
1. If the files are with same name then it has to display the location of the files with same name and store the information to some file.
2. After that it has to check for the contents of file and if the contents of the file are same it has to delete one copy and retain the other so i don't have a duplicate copy with same content.
Hope you understood what i am looking for, could please help me here?