Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Using the zip command, how do I add all files in the current directory to a zip file without including the folder?

For instance, when I unzip, I want all the files to dump out, not get put into a new folder.

I tried

zip *

But could not locate the zip file after it was done.

share|improve this question
You should edit this to include what OS you're doing this on. Also, remove the SSH - it has nothing to do with your question. – mfinni Sep 28 '10 at 13:50
Also FYI - on any Unix-like system (including Linux), if you type "man command-name", you can get the man page (manual) for the command. "man zip" would answer this for you. Not to say you shouldn't ask questions here, but you can get the easy answers fastest from the system itself and you'll learn a lot, too. – mfinni Sep 28 '10 at 14:23
In general, if you don't know how to use a command, type command --help or man command. In this case zip --help or man zip. Man as in manual. – Znarkus Sep 28 '10 at 14:24
up vote 4 down vote accepted


zip *

Notice how the arguments are backwards compared to your original example.

share|improve this answer


zip file *
share|improve this answer

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.