G
G
gibbonchik2016-06-12 15:47:31
bash
gibbonchik, 2016-06-12 15:47:31

How to add a directory to an archive in debian?

Good day. I'm trying to add a directory to an archive via a .sh script on debian. I do it like this:

zip -r /root/bc/jarmod/myjar.jar /root/bc/jarmod/javasoft/dir

But the /root folder and all subsequent ones are added to the archive. And it is necessary for me that the added directory began with dir and further. Tell me how to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gibbonchik, 2016-06-13
@gibbonchik

cd /root/bc/jarmod/javasoft && zip -r /root/bc/jarmod/myjar.jar dir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question