Computing.Net > Forums > Solaris > Copy symbolic link

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copy symbolic link

Reply to Message Icon

Name: FrankK
Date: May 13, 2003 at 06:02:26 Pacific
OS: Solaris 8
CPU/Ram: UltraSPARC IIe+, 1GB
Comment:

How to copy directories containing symbolic links without converting the link into a directory?
Is it possible to change owner/group of a symbolic link?



Sponsored Link
Ads by Google

Response Number 1
Name: zoozle
Date: May 16, 2003 at 08:10:05 Pacific
Reply:

Don't know of a way to copy symbolic links directly, but using chown and chgrp with the -h flag should help change the owner and group of a symbolic link.


0

Response Number 2
Name: SuicidalLabRat
Date: June 4, 2003 at 17:39:06 Pacific
Reply:

You can tar (CD && tar) the structure to maintain the links. mv should retain links as well, however, they remain relative if the node was created that way. I am not real clear if I am addressing your question though...

i.e. tar cf - ./moving_dir | ( cd /unpack-here_dir && tar xfB - )

I guess you dont truly need the 'B', but you can protect a bit from socket short reads ( though I recall tar trying to implement this function automatically when reading from stdin ) and the pipes same failing. Again, relative links to a file not part of your copied structure will be broken. If you anticipate the need for such links and a likelihood of cp'ing them around a lot you will need to set the ./link -> /path/to/file appropriately.


SLR-


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Copy symbolic link

Symbolic Links with Jumpstart www.computing.net/answers/solaris/symbolic-links-with-jumpstart/1043.html

hard and symbolic link www.computing.net/answers/solaris/hard-and-symbolic-link/3084.html

diff between soft link and hardlink www.computing.net/answers/solaris/diff-between-soft-link-and-hardlink/4212.html