|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to copy a symbolic link
Hi I am trying to find a copy command that will copy a symbolic link itself and not what the link is actually pointing to. I am trying to copy a directory that has some symbolic links within it
in IBM AIX unix this is achieved using cp -prh <source dir> <target> the 'h' flag is a hard copy which copies the link itself However there appears to be no similiar flag in Solaris Any idea how I do this in Solaris ? |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Hi ,
Can u try it out by taring in the directory and then copy it so that the link would be maintained. Thnks, jega |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
Can you tar (CD && tar) the structure to maintain the links?
mv should retain links as well but they remain relative if the node is created that way. eg tar cf - ./some_dir | ( cd /untar_here_dir && tar xfB - ) Again, relative links to a file not part of your copied structure will be broken. if you find the need for such links and the possibility of copying them around is a lot you, will need to set the ./link -> /path/to/location/of/file accordingly. |
|
#4
|
|||
|
|||
|
cd "dir"
find . | cpio -pmadv /new_dir |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tar the symbolic link | ganga.dharan | Shell Programming and Scripting | 1 | 05-23-2008 07:11 AM |
| need some info about symbolic link and hard link | detective linux | UNIX for Dummies Questions & Answers | 2 | 01-08-2008 06:36 AM |
| Symbolic Link Confusion | Sepia | UNIX for Dummies Questions & Answers | 5 | 05-07-2007 05:40 PM |
| symbolic Link | bhargav | UNIX for Dummies Questions & Answers | 1 | 10-15-2004 09:41 AM |
| get symbolic link file | andrec | UNIX for Dummies Questions & Answers | 11 | 11-13-2001 02:41 PM |
|
|