1

I am trying to create a zip file with a symbolic link.
I have a subfolder in my mainfolder with some.bundle. I create symbolic link for this some.bundle which is placed in another subfolder of mainfolder.
I then zip it using Terminal.

My problem is when I open the zip via Terminal and then try to copy the bundle to some other folder using the symbolic link. It doesn't works.

It gives an error something like this..

cp:/path to my subfolder with bundle symbolic link/some.bundle No such file or directory
  • Try tar'ing it before zipping – sdayal Nov 26 '15 at 18:17
  • I want it in zip only. I am using some other application and it requires only zip file.Thank you. – John Nov 26 '15 at 18:21
  • @John Did you use zip -y ... ... to zip the softlink? I hope I've understood your question correctly... – klanomath Nov 26 '15 at 18:25
  • I have used this command zip --symlinks -r foo.zip foo/ My problem is i want to open the some.bundle from the zip file via symlink.Sorry,if my question was not clear. :) – John Nov 26 '15 at 18:33
  • I have also tried using a software known as symlinker from this page macupdate.com/app/mac/41493/symlinker – John Nov 26 '15 at 18:36
0

I did the following to check/solve this (but I don't really know if I understand the question/the problem correctly):

enter image description here

  1. Create a file.bundle with

    touch /Users/user/temp/step1/file.bundle
    
  2. Create a symlink in another folder

    ln -s /Users/user/temp/step1/file.bundle /Users/user/temp/step2/  
    

    the (re-transcribed) hex content of the symlink is:

    /Users/user/temp/step1/file.bundle 
    
  3. Zip the symlink

    zip -y /Users/user/temp/step3file.bundle.zip /Users/user/temp/step2/file.bundle`
    
  4. Create a folder (step4), cd into it and unzip step3file.bundle.zip

    mkdir /Users/user/temp/step4
    cd /Users/user/temp/step4
    unzip /Users/user/temp/step3file.bundle.zip  
    

    the (re-transcribed) hex content of the unzipped symlink in /Users/user/temp/step4/Users/user/temp/step2 is still:

    /Users/user/temp/step1/file.bundle 
    
  5. Copy file.bundle in folder step1 using the symlink in a subfolder of folder step4 into folder step5

    cd /Users/user/temp/step4/Users/user/temp/step2
    cp file.bundle /Users/user/temp/step5
    

The above steps work. You probably zipped the folder containing the symlink and/or got some paths/commands (and maybe some options) wrong.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .