Quantcast
Viewing latest article 3
Browse Latest Browse All 5

Answer by Jonny for Command line zip everything within a directory, but do not include any directory as the root

Stumbled across this answer but didnt want to have to change in out of directories. I found the -j option useful which adds all files to the root of the zip. Note that its is all files so subdirectory structure will not be preserved.

So with this folder structure:

MyFolder - MyFile1 - MySubFolder   - MyFile2

And this command:

zip -rj MyFolder.zip MyFolder

You get this:

MyFolder.zip - MyFile1 - MyFile2

Viewing latest article 3
Browse Latest Browse All 5

Trending Articles