To zip all files in a given directory on Linux with the zip tool, you can use * with the zip command. This will take care of files with and without extensions since extensions are not so special on Linux. The * will match zero or more characters, with the dot included. The files that begin with a dot however are not considered when using * (or even *.*) .
Another alternative would be to use the -r (recursive) option which will parse a whole directory in one fell swoop. For instance :
zip -r my_files.zip the_directory. [linux zip folder]
Where the_directory is the folder which contains your files. The zip command in linux thus formed will have the same directory structure along with the files. Note that when extracting the zip file, it will save all extracted files in one sub-directory.
If you do not want zip to store the paths, you could use the -j/–junk-paths option.
For more on zip command, you can view the documentation on its man page.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.