What really helped me is my desire to automate most aspects of my job. If I'm doing something more than once(and twice is more than once), I prefer to automate it. I'm really stupid, and I'm really, really lazy. I am not good at repetitive tasks, but computers are. If there's one thing I feel is important for every programmer to get, it's that our single reason for existence is to make computers do work for us. We should look for opportunities to do so, not always because it is the most efficient thing to do, but because it is what we do.
So I end up writing a lot of bash scripts. A lot of small python scripts. Stupid scripts. Over time, you build up a library of tricks. You read threads like this where you pick up new tricks. It isn't something you'll learn once. Some of the tools take years to really get the feel of.