Operating System - HP-UX
1832574 Members
4858 Online
110043 Solutions
New Discussion

Re: copy /sbin/init.d and link files

 
brian_31
Super Advisor

copy /sbin/init.d and link files

Greetings:

I have to copy the following files from one machine to another, the other machines do not have these files

what would be the best way to copy them so that i get the exact links?

root#/sbin/init.d>
-rwxr-xr-x 1 root sys 3301 Jul 23 2003 dmq.rc
-rwxrwxr-x 1 root sys 3274 Dec 19 2002 listener.rc
-rwxr-xr-x 1 root sys 3324 Nov 8 2000 oracle.rc

root#/sbin/rc3.d>
lrwxr-xr-x 1 root sys 22 Nov 8 2000 S350oracle -> /sbin/init.d/oracle.rc
lrwxr-xr-x 1 root sys 19 Nov 8 2000 S370dmq -> /sbin/init.d/dmq.rc
lrwxr-xr-x 1 root sys 23 Nov 8 2000 S360sector7 -> /sbin/init.d/sector7.rc

root#/sbin/rc2.d>

lrwxr-xr-x 1 root sys 19 Nov 8 2000 K350dmq -> /sbin/init.d/dmq.rc
lrwxr-xr-x 1 root sys 23 Nov 8 2000 K360sector7 -> /sbin/init.d/sector7.rc
lrwxr-xr-x 1 root sys 22 Nov 8 2000 K370oracle -> /sbin/init.d/oracle.rc

Please help

Thanks

Brian
5 REPLIES 5
Deepak Kulkarni
Regular Advisor

Re: copy /sbin/init.d and link files

Hi Brian,

Since only very few files, do `rcp` and link the files one by one

Cheers
DK
Steven E. Protter
Exalted Contributor

Re: copy /sbin/init.d and link files

Shalom Brian,

You have to re-create the softlinks yourself.

ln -s
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: copy /sbin/init.d and link files

Hi Brian:

You can use 'tar'. By default, 'tar' preserves symbolic links.

Create a 'tar' archive of what you need; copy the tarball to your otherserver; and un-tar it.

Regards!

...JRF...
Sp4admin
Trusted Contributor

Re: copy /sbin/init.d and link files

Hi Brian,

I would use James suggestion. I would use the tar command to create a tar and copy to the other server and untar it.

sp,
Ivan Krastev
Honored Contributor

Re: copy /sbin/init.d and link files

You can use sftp - it copies files instead symlinks.


regards,
ivan