0

I am trying to compress the hundreds of jar files into a single zip file that can be transferred to a different location. Please help.

1 Answer 1

1

Jar files are very similar to zip archives therefore combining them into one archive will not save a lot of space. However if you really want to make one zip archive then one of the simplest solution would be to execute for loop on all jar files:

for f in *.jar; do
 zip archive.zip "$f"
done

If you want to use gzip, then:

tar -czvf archive.tar.gz *.jar

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .