压缩存储库的命令行逐个

时间:2014-07-26 15:03:20

标签: bash zip

我正在寻找一条命令行来压缩zip存档中的存储库。但是一个存储库=一个zip存档

例如:

find . -maxdepth 1 -type d
.
./von_Thunen
./bestiole
./iznogoud
./irius
./epiSim
./resilience
./micMac
./christaller
./sisbio
./proiePredateur

我想要

ls 
.
./von_Thunen.zip
./bestiole.zip
./iznogoud.zip
./irius.zip
./epiSim.zip
./resilience.zip
./micMac.zip
./christaller.zip
./sisbio.zip
./proiePredateur.zip

感谢' S

1 个答案:

答案 0 :(得分:1)

find * -maxdepth 1 -type d -exec zip -r {}.zip {} \;