Achieving a connected, collision-free and time-efficient coverage in unknown environments is challenging for multi-agent systems. Particularly, agents with second-order dynamics are supposed to efficiently search and reach the optimal deployment positions over targets whose distribution is unknown, while preserving the distributed connectivity and avoiding collision. In this paper, a safe reinforcement learning based shield method is proposed for unknown environment exploration while correcting actions of agents for safety guarantee and avoiding invalid samples into policy updating. The shield is achieved distributively by a control barrier function and its validity is proved in theory. Moreover, policies of the optimal coverage are centrally learned via reward engineering and executed distributively. Numerical results show that the proposed approach not only achieves zero safety violations during training, but also speeds up the convergence of learning.