First, it is important to understand that the placement of only can change the intended meaning of the sentence.
Imagine the following sentence, which should sound quite natural to native speakers:
"Why are you angry? I only did it once!"
Although this sentence may sound correct, it is shunned by strict grammarians. It would be better to word it "Why are you angry? I did it only once!"
The following sentences should make the meaning differences clear:
The rule of thumb is this: put only as close as possible to the word it should modify.
- Only Linda ate the pizza today. (Nobody else; only Linda.)
- Linda only ate the pizza today. (Linda didn't cook it or buy it; she only ate it.)
- Linda ate only the pizza today. (Linda didn't eat anything else today; only pizza.) Linda ate the only pizza today. (There was only one pizza, and Linda ate it.)
- Linda ate the pizza only today. (Linda didn't eat the pizza yesterday or before; only today; OR, Linda didn't eat the pizza until today.)
- Linda ate the pizza today only. (Linda didn't eat the pizza yesterday or before; only today.)