How to store symlinks as symlinks in zip file

While creating zip files, a copy of the file/directory they point to is saved instead of symlinks.

We can store symlinks as symlinks using switches on creation time.

For zip command,

#zip --symlinks -r foo.zip foo/

For Rar command,

#rar a -ol foo.rar foo/

For tar commnd it stores them as is by default,

#tar czpvf foo.tgz foo/

 

Leave a Reply

Your email address will not be published. Required fields are marked *