質問

I have a directory I am trying to zip on Linux before sending it to Windows.

I thought it worked with this command:

zip -r directory.zip directory

However when I looked at the directory it contained only the files, no folders. It's as if the -j command is the default, which is confusing.

I looked in the manual and I could not see any means of forcing it to maintain the directory structure in the zip.

Any ideas?

役に立ちましたか?

解決

It was an unzipping issue, not a zipping issue. The unzip command required -d to maintain the directory structure.

wzunzip -d directory.zip 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top