How to Copy Folder from one solaris machine to another?

Hi All,

Can any body help for below query......

How to Copy Folder from one solaris machine to another?

Thanks,

One method you could do is to compress the folder and transfer. Then, uncompress.
tar cvf testdir.tar /tmp/tesdir
scp testdir.tar user@dest_hostname:/somedir/

then login to dest_hostname, cd to /somedir and perform
tar xvf testdir.tar

hi,
what is the command for know the servername ?
help me.
thank :eek:you

do you mean hostname?

you have to login to that server and type "hostname"
or from ur current system, simply do a "nslookup <IP of that server>":stuck_out_tongue:

Hi,

You can use the commande "rcp" :

root# rcp -p <server>:/tmp/sourcedirectory /tmp/targetdirectory

<server> : is name of your machine, and the name of the machine should be declared on /etc/hosts.

the path: /tmp/.... is just an example

Thx.

ftp or scp could also do it.

a million ways to do the same thing. hehehe :b:

@vaibhavvd

Thats pretty simple, use scp its secure...Suppose xxx.xxx.xxx.xx and yyy.yyy.yy.y are the IP's of the servers and you want to copy from x to y server, then the format is

Login to yyy.yyy.yy.y

scp username@xxx.xxx.xxx.xx:/Desktop/filename /Documents

scp -R username@xxx.xxx.xxx.xx:/directory_name /Documents

Now file will be copied to /Documents in y server. If it is folder as u asked then use -r with scp, or may be -R, am not sure if its upper case or lower case. It copies the recursively. To copy a directory or folder -r ot -R option shld be used with scp. Try to copy as root user coz u may encounter permission issues when a normal user tries to copy files to desktop or / etc etc...Enjoy your copying :b::smiley:

just note that scp will encrypt packets. this takes longer. small transfers will not see much of a different but larger ones... most likely.