How can I create a zip archive without a file extension using the "zip" command?
The -A
(--adjust-sfx
) option causes zip
to treat the given archive name as-is:
zip -Ar archive directory/
This works even when archive
isn’t created as a self-extracting archive.
You can have it provide the zip output to stdout and then redirect it to a file:
zip -r - -- directory/ > archive
The first dash refers to stdout and the pair of dashes separates the initial arguments from the input list, for clarity.