Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 aa.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

1 Answer 1

This command will work:

cd test; zip ../aa.zip *

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

share|improve this answer

Your Answer

 
discard

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.