clearcasesymlink-traversal

How do I checkout then copy to all files at the destination of a symlink at once?


Background

I am following some instructions from a teammate. These instructions include a command to checkout, then copy .a files from a make command from one vob to another. The commands were given to me as such:

ct co -nc -unr /vobs/sbov/ABC/libs/qwert/*.a
find . -name '*.a' | grep -v ABCDE | xargs -I {} cp {} /vobs/sbov/ABC/libs/quert

This should have no problem working normally...except recently numerous .a files in that directory have changed from files to symlinks. Symlinks are not clearcase elements. Therefore, the commands attempted to checkout, then copy to, various non-clearcase entities as opposed to the actual files. Hence my question...

Question

How do I modify the commands above to manipulate the actual files the symlinks point to, as opposed to the symlinks themselves?


Solution

  • Try first a cp with a de reference option

     find . -name '*.a' | grep -v ABCDE | xargs -I {} cp -L {} /vobs/sbov/ABC/libs/quert
                                                      ^^^^^^^^
    

    That should help getting actual files instead of symlinks.