In this paper, an optimal servo control strategy is presented to achieve high seek/settle performance without compromising the targeted seek time in hard disk drives. The cost function to be optimized is given by a weighted quadratic function with respect to time and the jerk of control command. Thanks to the fact that the cost function is directly penalized with time-varying weightings, the proposed method is more effective to minimize the settling vibration induced by the actuator seek profile compared with the previous optimization approaches in literature. The proposed approach is applicable to any given initial and terminal conditions.