First I used zip
to archive folder(s) in Ubuntu. Then I used 7zip
to extract those folders on Windows. There are symbolic links in the folder(s). I'm sure everything pointed by any symbolic link in the folder(s) is in the folder(s) too.
How can I set up the zip flag so that after extracting the folders under Windows, the symbol links work as before? This means that the symbol links should not be followed, but archived as symbol link information, which I'm not sure is supported by the zip format.
Short answer: yes, if you do not specify the
--symlinks
option.By default, the
zip
command will dereference symbolic links. This means that symbolic links are replaced by the actual files or folders they link to. Thus, you could be sure that all files and folders that are referenced by your symbolic links on your linux system will actually be included as "real" files and folders in your zip file. When you extract the zip file on Windows, any of these files and folders will appear as "real" files and folders.Short answer: you can't unless 1) the receiving file system supports linux symbolic links and 2) the target files/folders of the link are present
The ZIP format supports storing the symbolic link. To store symbolic links as such, you can use the
--symlinks
option. Symbolic links under Linux, however, only work on file systems that support these symbolic links. Thus, such archive needs to be extracted on a suited file system for these links to work again (and then of course, provided that there are corresponding target files on the system where the zip file is extracted).