Free Hex Editor that allows search and replace across files in folders and their subfolders etc

LaserBeak picture LaserBeak · Apr 1, 2012 · Viewed 7.8k times · Source

Looking for something like Neo Hex editor Pro and above but free that allows to replace hex, string etc. values across multiple files in folders and their sub-folders.

Anything out there?

Answer

sarnold picture sarnold · Apr 1, 2012

The find and sed tools can be combined to do some of this task, though they won't be very helpful if you're "feeling your way through the changes" -- you have to know exactly what you want when you invoke them.

If you wanted to change 0xDEADBEEF to 0xCAFEBABE in an entire project, you could do something like this:

find . -type f -name '*pattern*' -exec sed -i -e 's/\xDE\xEA\xBE\xEF/\xCA\xFE\xBA\xBE/g' {} \;

Both find(1) and sed(1) are incredibly flexible; the time spent learning them both will be handsomely repaid.