Is there a way to zip all files in a given directory with the
zip command? I've heard of using
*.*, but I want it to work for extensionless files, too.
You can just use
where myfiles is the directory containing your files. Note that the produced zip will contain the directory structure as well as the files. As peterph points out in his comment, this is usually seen as a good thing: extracting the zip will neatly store all the extracted files in one subdirectory.
You can also tell zip to not store the paths with the
Another way would be to use find and xargs: (this might include a "." directory in the zip, but it should still extract correctly. With my test, zip stripped the dot before compression)
This will by default include all sub-directories. On GNU find