Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I'm trying to compress files in a directory. Let's assume the directory is "test".

when I execute the following command and unzip the file, I get "test" folder and files inside the test folder.

zip test/*

How do I make it so that I get only files without "test" folder when I unzip the compress file?

share|improve this question

This command will work:

cd test; zip ../ *

If you need to do this for multiple directories, do this command for each one. zip will append the new files to the archive.

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.