Interstellar is intentionally vague in several areas, and the answer to your question is never fully explained.
My interpretation of the events is an inner conflict in Murph. She is very intelligent, and Cooper is constantly encouraging her to use that intelligence. Go to college. Find a solution to the blight instead of brute-forcing it with more crops.
At the same time, Murph is a child. Children have vibrant imaginations and more easily believe things that are impossible.
Murph knows there is a possessed bookshelf. Something is different about it. Cooper even sees it too, although he is less accepting of any supernatural phenomenon. Murph tries to rationalize what she sees: random, tiny tidbits of information. Inside, her child-like desire to believe in amazing things wants to believe that the "force" causing those events must be the only person who knows her for who she is: a budding child scientist who can decipher the clues. Someone she knows: her father.
At the same time, the rational side of her knows that is impossible. This bookshelf must be acting weird because of the wind, or electromagnetic fields, or any other natural force but not her father communicating from beyond the 3rd dimension.
Why would she say "dad, this is you sending signals" before he leaves? Cooper is equally as mystified. The proof is when he is in Gargantua, looking through the bookshelf, yelling at himself to listen what future Cooper is saying. Even though (I believe) she felt it must have been him, there was no clear proof. She could not believe it because nobody else would - unless it were some sort of elaborate prank. A prank involving the coordinates of a classified NASA facility that neither of them knew about.
After Cooper leaves on his mission, Murph leaves for her career at NASA and pays the mysterious bookshelf no mind. Dr. Brand reveals himself as a fraud who sent everyone, including her father, off to die.
Eventually, she visits the bookshelf again and looks at her notebook: she says "it was you. You were my ghost." The memories come back. The patterns. Morse code. Everything clicks into place: dad fulfills his mission by giving Earth instructions for Plan A even though Dr. Brand said it was impossible. If Plan A is supposed to be impossible but she has a notebook full of scientific knowledge that can make it happen, could her inner desire for Cooper to be alive and for him to be the cause of those messages also be true? There is no plausible explanation for the communication other than someone on the other side of the wormhole to provide the information that they seeked. Who would give it to Murph rather than NASA other than Cooper? It must be him. Now she knows.
At the end when they wake Murph from her sleep and father and daughter see face to face again, she sums up all of those events. She always wanted to believe it was him, but knew that was irrational: there was no proof, and it made no sense at the time. She had no way of knowing beyond the shadow of a reasonable doubt, as a child, so could not tell Cooper before he left on his mission. However, the evidence at the end was incontrovertible and proved her gut feeling was correct all along. Even then, nobody believed her. Everyone thought she was the one making the scientific breakthroughs.
Why does she not ask/tell him (that she knew he was the 'ghost') that
when she is sending him videos from earth in the earlier scene, when
she becomes as old as he (at the time he left earth). Surely she knew
Maybe she did send messages saying she knew: but he never received them. Given the time dilation in Gargantua, it is likely that she would have sent them too late for him to receive them.