find and delete duplicate files, however different names, using sh
if you have many files in different folders, however they have different names,
assuming they have some common part (“CommonPart”) in the front of their names:
for i in $(ls Folder1 Folder2 Folder3|grep -oE CommonPart.* |sort |uniq -d)
do echo Folder1/CommonPart$i is going to be deleted
rm -f Folder1/*$i;
done
for i in $(ls Folder2 Folder3|grep -oE CommonPart.* |sort |uniq -d)
do echo Folder2/CommonPart$i is going to be deleted
rm -f Folder2/*$i;
done
not very elegant, but effective.