Searching same filenames in different partitions

Hi,

We are doing some migration work. The same files may exist in different partition/mountpoints. We may place it in a single place, hence we don't want any duplicates...we will rename the file names if we know the files which has duplicates(by file name)).

It would be nice if a script searches each partition and list out the names in the following order.

Enter the mountpoints you want to search separated by ","

user input : /mountpoint/di2/subdir/, /part/dir, /part2/dir

test1 does exist in the following partitions/paths (fullpath)
test1 in /part/dir, /part2/dir, /mountpoint/di2/subdir/

Use the find command and don't use commas. I suggest not being so wordy with "does exist". If it exists the find command will tell you.

Hi,

I don't understand " I suggest not being so wordy with "does exist"

Can you provide a sample find command...

Thank you in advance

Hi.

There are commands that can locate duplicate files. See find same size file for scripts that use 2 such commands, fdupes and rdfind.

Best wishes ... cheers, drl