Just for shits and giggles, I want to make a small script that deletes duplicate files from any directory. Movies, music, pictures, text, whatever.
Is it safe to calculate the hash value of each file for this or do I need to actually compare each byte to be absolutely sure?
>>62457152
Install gentoo
>>62457152
Should be fine, just make sure to exclude C:\Windows, and also have a secondary script interface that lets you select what duplicate files to delete and which to keep (or to keep both).
Otherwise you'll end up with the problem of some programs not working because some 3rd party library DLL was deleted due to being a duplicate of the same DLL found in some other program folder.
>>62457152
https://www.hardcoded.net/dupeguru/
it's in python, it's free, and you may check how they do it (or you can simply use it).