What is the safest way to rename my altcoin from "bitcoin" to "myaltcoin" in the source code? Some Context

I am creating my own altcoin for learning purposes and have successfully built the bitcoin code from source with my own genesis block.

Now is it time for me to change the name of the coin, so that it is truly my own alt coin.

To do this, I presume that I must change every instance of bitcoin to myaltcoin in the code, so that when I run bitcoin-qt (after the change I hope to be able to run myaltcoin-qt), everything inside the GUI will say myaltcoin and not bitcoin.

How I propose to do this...

I figure that the best way to do this would be to do some kind of case sensitive find and replace, to recursively go through all files and directories and the strings in the files, changing every instance of bitcoin to myaltcoin

The Question

What is the safest way to do this in the linux terminal? To do this safely I assume I must:


Account for case sensitivity.
Replace file names of bitcoin to myaltcoin
Replace text instances of bitcoin to myaltcoin within files 
Replace bitcoin to myaltcoin in directory names


I presume there is some way to do this with find, but I'm not sure what the best way is.
To find string with in the files (including binary files), issue the command:

grep -rnw '/home/user/' -e 'bitcoin'


It will return every single entry for the word bitcoin in your code.

But I do not think that's the best way to get what you have in mind, what about "if" you have a CONST or a variable in the code called const BITCOIN or bitcoin ?

Your approach would be catastrophic for the base code and probably it will not compile. Just do not do that, instead try to find all the points with the command above, once you find all the entries, change it manually (read the code before you do that) and not using find and replace option from your code editor.