Consider the definition of the 'attack' command as 'Fire if target is in range. If not, move until in maximum range, then fire'.
If you're using move command to chase caps, they will fire anything in range. In this scenario they have no specific 'target' because you haven't specifically told them to fire on the cap. Instead, they are primarily concerned with speedily getting to a specific point in the grav well.
With these in mind, you can see that neither are necessarily the 'better' way to chase cap ships because it depends heavily on the situation and, as implied by greyfox, unit type. Use attack command if you are absolutely sure cap ship won't get away. If you think it will get away, and you're desperate to take out the cap, use the move command to catch up with it.
With regards to escaping with any unit for that matter, it is faster to press shift, right click on exit point of the grav well, followed by exit grav well. This is as opposed to just telling it to leave grav well in one click. But the time difference between these command sets diminishes as the unit starts at a closer point from the grav well edge.
F7