Question: how to locate a command block in minecraft?
Answer: Open up the program and select File > Open Minecraft Save Folder2. You will get a list of folders corresponding to your worlds. ... 
Go to Search > Find ( Ctrl + F ). In the popup, under Name, enter "Command", and set Value to your code snippet. ... 
Click on Find and wait.