Centos – Command-line ZIP client

centoscompressionssh

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 * file.zip

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

Best Answer

Use

zip file.zip *

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