Zip multiple files one by one

Ask a question

Zip multiple files one by one




Issue


I want a hundred zip files in a directory one by one.
such that:
foreach dir *. img do in zip $ 1.zip 

Solution


There is the right command line;
lami20j@debian-acer:~$ ls *.img
a10.img  a1.img  a2.img  a3.img  a4.img  a5.img  a6.img  a7.img  a8.img  a9.img
lami20j@debian-acer:~$ ls *.img | zip archive_img -@
  adding: a10.img (stored 0%)
  adding: a1.img (stored 0%)
  adding: a2.img (stored 0%)
  adding: a3.img (stored 0%)
  adding: a4.img (stored 0%)
  adding: a5.img (stored 0%)
  adding: a6.img (stored 0%)
  adding: a7.img (stored 0%)
  adding: a8.img (stored 0%)
  adding: a9.img (stored 0%)
lami20j@debian-acer:~$ zip -sf archive_img.zip 
Archive contains:
  a10.img
  a1.img
  a2.img
  a3.img
  a4.img
  a5.img
  a6.img
  a7.img
  a8.img
  a9.img
Total 10 entries (0 bytes)
lami20j@debian-acer:~$ file archive_img.zip 
archive_img.zip: Zip archive data, at least v1.0 to extract

Note


Solved by lami20j

KDE - Enable Double Click
Java Compile Error cannot find symbol