Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

zip -r /tmp/foo/ /tmp/foo/* > /dev/null 2>&1

and the achieve is in this structure


Why is /tmp part of the structure?

share|improve this question
up vote 4 down vote accepted

It is because you tell it to do that ;-)

I would do something like this:

cd /tmp && zip -r /tmp/ ./foo/* >/dev/null 2>&1
share|improve this answer
Thanks. So it has to be relative. – CppLearner Feb 15 '13 at 19:17
Why ** instead of *? – Eliah Kagan Feb 15 '13 at 19:19
where do you see **? >:D (no idea where that came from :X ) – Rinzwind Feb 15 '13 at 19:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.